<div style="clear:both"></div> And when can I use this? starting to get into web development. I saw this being used a lot
<div style="clear:both"></div>
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 */ .parent-element { *zoom: 1; } /* Modern browsers */ .parent-element:after { content: ""; display: table; clear:both; }
You can read about the best solution (clearfix) here
<div style="clear:both"></div>And when can I use this? starting to get into web development. I saw this being used a lotWhat 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?
You can read about the best solution (clearfix) here