CSS heros. Need your advice.
- Started
- Last post
- 4 Responses
- nocomply
I've been doing a lot of research about the possible ways for clearing floating divs. Thus far, I have come up with 3 widely acknowledged methods.
1.) Old fashioned empty clear div.
2.) Using the :after property with the "holly hack" for IE Win/Mac
http://www.positioniseverything.…3.) Setting the width of the container element to 100% and setting overflow to either auto or hidden as detailed here:
http://www.quirksmode.org/css/cl…What method do you guys use? Is there another way that I missed? Up until this point I've really just been using #1. I was thinking about possibly trying to submit a detailed article covering all this to ALA. Are you guys interested in that? Is it worth my time?
- ldww0
traditionally i have always done the empty div with clear:both
but just recently i have started using the clearfix from position is everything.
- altkev0
I usually use the same clear:both trick youve mentioned, except I apply it to a and give that line break a class of "clearing"...
So for instance:
and then in CSS:
.clearing{clear:both;}
- altkev0
Er.. supposed to be:
"...xcept I apply it to a line break..."