Previous Message
Next Message

float clearing: div clear or br clear all

Sent by Pringle, Ron on 9 November 2005 17:05


> I prefer to use <div class="clear"></div> and in my css use
> 
> div.clear {
> clear: both;
> }
> 
> but I find that sometimes it doesnt work at all and I have 
> only been able to
> get clearing by reverting to the break tag again
> 
> <br clear="all" />
> 
> this is fine for the most part on transitional doc types but 
> its not when
> I'm going strict as its not valid.

Clint-

You could try using:

<div class="clear"><!-- --></div>

That will give you an empty div with no dimensions. I can't recall exactly
why the comment is required, but perhaps searching the archives will provide
an answer, or another less dimwitted css-d'er other than myself can explain
it.

regards,
ron 
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Possibly related: