"Mastering CSS Reading Notes" eighth chapter layout

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.