This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Dreamweaver > January 2005 > css: using clear





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author css: using clear
Alexander Ross

2005-01-31, 7:22 pm

Lets say I have this:

<div id="parent" style="color:#CCC;">
<div id="child" style="float:right; width=100px;">
blah blah blah blah<br>
blah blah blah blah<br>
blah blah blah blah
</div>
foo foo foo foo foo foo foo
</div>

In this example, the floting section will usually be longer (vertically)
than the main content of the #parent tag. Therefor, the "blah blah blah"s
will appear both inside and below the gray box. To remedy this i have been
adding the following just before the final </div>:

<br style="clear:both">

I feel like this is a band-aid solution and that I'm missing some better
remedy. For lack of a better term, this seems extremly inelegant. Thoughts?


Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews