Page Layout Basics third time (floating layout)

Source: Internet
Author: User

Clear float

To clear floating methods:
Set the following properties on the affected element
1, set the clear property for the element--clear:both; clear:left; or clear:right;
2, at the same time set width:100% (or fixed width "fixed width may have problems") +overflow:hidden;
A width of 2 is set to 100% to inherit the widths of the parent container. Fill the container with left and right, and clear the floating create condition for yourself. With the overflow hidden, you can remove the floating part of the package.

Horizontal Two-Column layout implementation: This is one of the most common ways to page layout
Key Application Skills:
Float Property--arranges vertically the block-level elements, arranged horizontally
Margin Property--sets the spacing between two columns

Page Layout Basics third time (floating 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.