CSS Floating: Floats and Float Shapes by Eric A. Meyer

CSS Floating: Floats and Float Shapes by Eric A. Meyer

Author:Eric A. Meyer [Meyer, Eric A.]
Language: eng
Format: azw3, pdf
Publisher: O'Reilly Media
Published: 2016-01-12T16:00:00+00:00


h3 {clear: both;} <h3 style="clear: none;">What's With All The Latin?</h3>

Figure 1-24. Not clear at all

In CSS1 and CSS2, clear worked by increasing the top margin of an element so that it ended up below a floated element, so any margin width set for the top of a cleared element was effectively ignored. That is, instead of being 1.5em, for example, it would be increased to 10em, or 25px, or 7.133in, or however much was needed to move the element down far enough so that the content area is below the bottom edge of a floated element.

In CSS 2.1, clearance was introduced. Clearance is extra spacing added above an element’s top margin in order to push it past any floated elements. This means that the top margin of a cleared element does not change when an element is cleared. Its downward movement is caused by the clearance instead. Pay close attention to the placement of the heading’s border in Figure 1-25, which results from the following:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.