Hi, How do I go about clearing a float after the closing of a DIV? For instance I always find myself having to use an extra div to clear the float, is there no other way of doing this?
I usually create a class for the <br> tag: br.clear { clear: both; } Then after my <div> with the float, I use: <br class="clear" /> There may be a better way to do it, but this has always worked for me.
Go to google and type in "Enclose floats" and you'll get Gary's (kk4st) page right away. There are goofy methods like the PIE method (use CSS to make a . which is invisible which clears the float) or overflow: hidden is an easy way discovered by Paul O'Brien at Sitepoint. He discovered that any overflow property that's not the visible value (the default) does the trick, but hidden doesn't give you teh fugly sidebars.