Log in

View Full Version : float left doesn't come up left



chechu
12-01-2009, 01:56 PM
In the css of http://www.portretkunst.be/contact.php I used the css style float=left twice to have the left div with the select options and the contact form and the text div next to eachother.

This is the css of the div that contains both:

#global {background-color: #fff;position: relative;width: 800px;margin: 0 auto;text-align: left;font-size: 10px;}
This is the css of the div of the left content (select options and contact form):

#select {float:left;top: 200px;width: 225px;margin-left:40px;padding-top:25px;}
This is the css of the div that contains the plain text:

#text {float: left;position:relative;margin-bottom:20px;}

My problem is that this works perfectly in MSI7, but in MSI6 the two divs are shown on top of eachother, instead of side by side.
Does something needs to be added in order to have the same visual result in both MSI6 and MSI7 ?

chechu
12-04-2009, 05:08 PM
Anyone, please ?

the penguin
12-04-2009, 08:22 PM
That appears to be the double margin IE6 bug.

Try putting an explicit width on #text being 600px.

Also try putting display:inline; on #select.

chechu
12-05-2009, 11:47 AM
Still doesn't work, it seems. MSIE 5.5 works well, and MSIE 7+ also, but the evil 6 doesn't change ...

the penguin
12-07-2009, 03:34 PM
I put display:inline; and reduced the margin-left to margin-left:30px; and it worked.

chechu
12-07-2009, 05:49 PM
It works all well now, thanks !

the penguin
12-07-2009, 06:00 PM
Excellent!