CSS-Tricks is brought to you in part by Media Temple, the web hosting that we both use and recommend.
And when can I use this? starting to get into web development. I saw this being used a lot
What does a colon do is what you’re asking? Could do a lot of things, depending on the context. You’ll have to be a lot more specific.
I think we miss the link.
div style=”clear:both;” div
Basically, it clears floated elements to ensure that the element it is applied to appears underneath any floated elements.
This technique is getting old, progressively disappearing. We’re not using extra HTML element to clear floats anymore.
So what is the new technique?
/* Optional if you don't plan to support IE6/7 */
/* Modern browsers */
You can read about the best solution (clearfix) [here](http://nicolasgallagher.com/micro-clearfix-hack/)
You must be logged in to reply to this topic.
Search for Stuff
Browse the Archives
Get the Newsletter
... or get the RSS feed