What is float closure

Source: Internet
Author: User
Tags closure

First, you must know two things:
1. Browser events display objects in a flow layout in accordance with the order in which the objects are declared in the HTML code.
2. Almost all objects in HTML are divided into two types by default: The Block object and the In-line object. where the block default display state is to occupy the entire row; The In-line object, in contrast, allows other objects to be displayed in a row.
Now look at the float property, which is to change the default display of the Block object. Once the Block object has a float property set, it will no longer occupy one row on its own.
Answer add
If there is a Div property is Float:left, it followed by a Div, this div will automatically follow the previous div behind, and then float, if you do not want the following div to float, you need to close the previous Div, with Clear:both. This will not interfere with the following Div. (www.3lian.com)
Answer add
If you add float to your code, the div block that you add later will also follow the float you defined earlier, and if you don't want it to follow the float behind it, close it!

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.