/ Published in: CSS
URL: http://net.tutsplus.com/tutorials/html-css-techniques/css-fudamentals-containing-children/
- _height: Triggers “haslayout” in Internet Explorer, by using the underscore trick to target IE6 directly.
- content: After the container div, append a period.
- visibility: We don’t want to see the period, so hide it from the page. (Equal to setting opacity: 0;)
- display: Forces the period to display as a block-level, rather than inline.
- clear: The important property. This clears the main and sidebar divs. This is the same as adding an unsemantic to our page.
- height: Don’t take up any space.
- font-size: Just a precaution for Firefox. This browser sometimes adds a bit of space after our parent element. Setting the font-size to zero fixes this.
Expand |
Embed | Plain Text
.clear_fix { _height: 1%; } .clear_fix:after { content: "."; visibility: hidden; display: block; clear: both; height: 0; font-size: 0; }
You need to login to post a comment.
