Forum Moderators: not2easy

Message Too Old, No Replies

Divs with float

Strange position of left-float.

         

Izkoo

8:29 pm on Jun 5, 2008 (gmt 0)

10+ Year Member



Hi there!

I'm using this code:
CSS:
-------
#content {
margin-top: 75px;
width: 597px;
height: auto;
}

#left {
width: 110px;
height: 497px;
margin: 0px;
padding: 0px;
float: left;
}

#right {
width: 485px;
height: 100px;
}
--------

HTML:
---------
<div id="content">
<div id="left">
&nbsp;
</div>
<div id="right">
&nbsp;
</div>
</div>[/code]
---------

But the right-div goes under or over the left-div. I've tried clear:both; between the div's, but it didn't help.

http://img389.imageshack.us/img389/6121/imgbf8.gif

[edited by: Izkoo at 8:30 pm (utc) on June 5, 2008]

FranL

1:55 pm on Jun 9, 2008 (gmt 0)

10+ Year Member



what are you trying to achieve?

rocknbil

5:31 pm on Jun 9, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try floating only the left div, or the right div, and let the unfloated one fall in the document's natural flow. Make sure the floated div comes before the unfloated div in the document source.

Or float them both in the same direction.