In our daily Web page development, each page has a lot of div layout, then we know in the development of CSS float will produce CSS float, that after each float, we have to do is to clear the float, this use we will be using the clear style properties to achieve, Today, we will introduce the clear both clean floating use summary!
Clear both in CSS clears floating
1.css floating-float/clear text and detail
As you can see, even if the width of the P1 is very small, the line in the page can tolerate P1 and p2,p2 and will not be ranked behind P1, because the P element is a exclusive line. Note that these theories refer to p in the standard flow. Side dishes think that, no matter how complex the layout, its basic starting point is: "How to display multiple p elements on one line." It is clear that the standard flow has not been able to meet the demand, it will use floating.
2. A deep understanding of the clear element in CSS
When the clear property of all elements is set to right, the reason for precedence is not what you think: There are no floating elements on the left, but floating elements appear on the right.
3. Clear floating Tips in CSS
The following small series for everyone to bring a detailed explanation of the CSS in the clear floating technique. Small series feel very good, now share to everyone, also for everyone to make a reference. Let's take a look at it with a little knitting.
The clear property of 4.CSS clears floating usage in detail
The popular view on the Internet is that in non-IE browsers (such as Firefox), when the height of the container is auto, and the contents of the container are floating (float is left or right), in which case the height of the container cannot be automatically stretched to fit the height of the content. A phenomenon that causes content to overflow outside the container and affect (or even destroy) the layout. This phenomenon is called floating overflow, in order to prevent the occurrence of this phenomenon of CSS processing, called CSS to clear the float.
5.css don't forget to clear the floating clear:both
This article mainly introduces the CSS do not forget to clear the floating Clear:both example, the need for friends can refer to, using the code case in detail CSS do not forget to clear the floating clear:both, simple and clear code can do extrapolate effect!
Clear both remove floating related questions and answers:
1.css-Why set display:table in Clearfix:after
Location of 2.javascript-clear:both Placement
"Related articles recommended":
1.css-cursor Properties and Usage Summary
Summary of background-position attribute usage in 2.CSS
Summary of how to set the navigation bar in 3.css
Summary of methods for setting dash styles in 4.html and CSS