Quick float question guys : )

[B]Hi there, I’ve been working with float layouts for a while now but have a question you smarter people will be able to help with.:wink:

Now I always float my divs, containers, but almost never my p,h1,h2 and so on within the div containers, is this correct or should I be floating everything?[/B]

The reason I ask is sometimes I have maybe a table in a floated container div and it pops to the right in safari, I use a float to align it back in but paragraphs underneath it go strange. :cool:

Should I be floating everything inclusing p,h1, h2 or am I fine to do either? Big thanks in advance you clever people ya!

No you should not be floating everything. It sounds like the “paragraphs underneath it” just need a clear on it. Aka clear:both :slight_smile:

ah cool, I must admit I’ve only cleared on floats can you use clear on non floated objects? cheers Ryan

can you use clear on non floated objects?

Yes you can use clear on all block level elements and in most cases you would probably be using it more than you do on floated elements for the reason that you want following content to clear the floated content above.

Also if you need shrink wrap behavior then you will also be using a clear on it, because a float/clear create a new line for every float :slight_smile: