Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Clearing Floats In CSS

DZone's Guide to

Clearing Floats In CSS

·
Free Resource
Float clearing CSS...


.container:after {
    content: "."; 
    display: block; 
    height: 0; 
    clear: both; 
    visibility: hidden;
}

.container {display: inline-table;}

/* Hides from IE-mac \*/
* html .container {height: 1%;}
.container {display: block;}
/* End hide from IE-mac */
Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}