css help - float: left; / clear: left;

SoRnMaN

Gawd
Joined
Jan 22, 2002
Messages
839
Ok, I have an admin site I am working on, but have run into a problem. I am using examples from the site http://www.quirksmode.org/css/forms.html to do form layouts, but am running into a problem when inserting it into my layouts.

The problem is this, the br's "clear: left;" is clearing all floats to the left, not just the one in the container div I was it to. Is there a way to prevent this? I will try to show an example:

<div float: left> <div> <div float: right>

The left and right columns are for menu and navigation and stuff. When I insert the example code as listed previously in the center div (for content), it breaks the form up, causing it to put the 2nd form entry field after it has cleared the menu navigation div on the left.

I have alos pulled the page in question into the following URL:

http://tt.8xmedia.com/test.html
 
do :left :left :right and see if that works, then clear:both at the bottom.
 
Cool.. thanks.. it works, but moving the middle div to a float would cause problems if i wasn't using a static width for this site. Fortunately, it is static width, and works fine now.

At first I attempted to just use float: left; for the content div, but that caused it to shrink some, as the actual text didn't cause it to cover the full div area.
 
Back
Top