Quote:
Originally Posted by Killswitch
I have a div with 3 more divs inside of it, those 3 divs use absolute positioning and left attributes to put them where I want them, I then do .clearFix:after { clear: both; } and set the class of that parent div to clearFix but it's still showing the bottom of the div right up against the bottom of the 3 divs instead of the 15px padding there is supposed to be...
|
1) Whenever possible, avoid using absolute positioning and instead use float/margin/padding and allow the divs to "fall" into place within the parent element.
2) The :after pseudo-class may not work on older browsers.
3) Setting an overflow attribute for the parent element, whether it's "auto" or "hidden", should be sufficient to clear the floats.