Clearing Floats

Hi,

I read up a lot of articles about clearing floats, and I have a doubt regarding which method I should use.

Clearing with { overflow: hidden; } while works without additional markup, it is obstructing to css hover boxes which I have on my site. So, I currently resorted to using the old div clearing. Is clearing via :after { content: “.”; … } method and letting IE’s expanding box bug to auto clear floats considered semantic?

Though the “.” is not visible, still adds something that really shouldn’t have to be there. Since IE7 doesn’t have expanding box bug and no support for :after - will using this method not work on it? If so, any workarounds that doesn’t involve markup, overflow: hidden, or JavaScript?

Thanks in advance. :slight_smile:

You don’t need the dot. It can just be " " void of the dot. They are all fine. It doesn’t really matter which in my opinion. http://www.visibilityinherit.com/code/contain-floats.php