After learning the basis of CSS layout and then to read the "proficient in CSS" This classic book, the layout has a further understanding.
Floating-based layouts
The layout of the two columns is still using one element to float to the left, one element to the right, and it is worth noting that the display:inline is added to prevent the double margin floating in IE from creating a bug.
The three-column layout and yesterday's use of different methods, all rely on the float to achieve, with the two-column layout first to achieve the main content and the secondary content of the left and right floating, and then the main content of the main div and the sub-div are floating separately.
Do not forget that the floating processing of the parent element should be cleaned up because the element floats Overflow:hidden
But there is no problem with the three-column layout when the main content is not cleared for floating. (What is the reason?) )
Streaming layouts and resilient layouts
Fixed-width layout has many drawbacks, the first is fixed second also about the president and text legibility, often only suitable for the browser default font size.
A streaming layout can be scaled relative to the browser window by using a percentage rather than a pixel setting.
The elastic layout is to set the base font size, and the layout will increase as the text size increases.
"Mastering CSS Reading Notes" eighth chapter layout