Web site production can not be separated from the page layout that is Div+css will be involved, the following is a summary of the work of some skills, left to spare, but also to learn Web front-end Tutorials (div+css+jquery) .
1, UL: The default UL margin and padding is not 0, if in the navigation with the left floating Li, often will be the external div brace large, resulting in page deformation, changed to: ul{margin:0px; padding:0px;}
2. IMG:
(1) Here is involved in the different browser problems, IE6 display image height is always greater than the exact value, here we need to remember this point img{display:block};
(2) the page is best not to use large chunks of background, can be tiled to tile, otherwise loading will be very slow, also not conducive to future optimization and expansion, of course, there are some large sites, and now try to put the background unified into a picture, with background-postion to obtain the background.
(3) The best format is the GIF format, that is, to ensure that the background is transparent, there will be no shadow in the IE6, and sometimes the GIF image will be jagged, which requires us to save the web format, set the value of Matter,matter with the background color of the more similar the better.
3, overflow: Sometimes the company's registration agreement is very long, this is used to overflow, you can add the div style: Overflow:auto
4, float: sometimes some div will squeeze over the top of the page, which may be caused by a float, can add Clear:both.
5, div:height equals 1px div, may not be 1px in IE6, Add font-size:1px to the style of this div, so it's OK.
6, ID and class: When a style is used more than once in a page, do not use the ID, To use class, when using JS, the style is best not to use the ID, because the ID to be left to JS use.
7,link:.link:link{},. link:visited{},. link:hover{},. link:active{}. There is a point, the order of visited and hover must not be switched, otherwise IE6 will be a big problem.
To learn more about the page Layout tutorial knowledge can be landed e Mentor network.
DIV+CSS layout use of personal experience