Log in

View Full Version : Clear all



fred2028
03-11-2009, 02:31 PM
I use

<div style="clear: all">
asdsdad
</div>
To try to make a div position below all preceding/succeeding divs. However, I don't get that.

What do I need to do to make a <div> take up the entire page width and not fit beside another div?

jscheuer1
03-11-2009, 02:38 PM
If you want to clear floats, the proper values for the clear property are:


left
right
both


So, if you only need to clear one or more left floats, use:


clear: left;

one or more right floats:


clear: right;

one or more each of right and left floats:


clear: both;

fred2028
03-11-2009, 02:53 PM
If you want to clear floats, the proper values for the clear property are:


left
right
both


So, if you only need to clear one or more left floats, use:


clear: left;

one or more right floats:


clear: right;

one or more each of right and left floats:


clear: both;

Thanks a lot!