Clearing DIVs and Floats
Ok, here is YAWTCF implementation I came across via a coworker.
The theory is basically using the CSS pseudo class “:after” on the main div wrapper (the one containing the 3 columns) see example, and applying a height to it.
Read the full explanation with notes.
/* clearfix positioniseverything.com */#Main:after { content: “.”; […]
Ok, here is YAWTCF implementation I came across via a coworker.
The theory is basically using the CSS pseudo class “:after” on the main div wrapper (the one containing the 3 columns) see example, and applying a height to it.
Read the full explanation with notes.
/* clearfix positioniseverything.com */
#Main:after {
content: “.”;
display: block;
height: 0;
clear: both;
visibility: hidden;
}
#Main {
width: auto;
border: 1px solid #ff0;
background: url(’bg.gif’) 20% 0% repeat-y;
height: 1%;
}



















