float:left in IE5

E

Edwin van der Vaart

chlori said:
Edwin van der Vaart schrieb am 17.04.2004 22:10:



The content jumps to the right.

http://stuff.arto.ch/layout.php

Hmmm. It seems that the content have a conflict with the margins of
#content.
So my suggestion is to replace the margins for a width.
Like:
#contentcontainer{
width: 95%;
background-color: white;
}

#content {
width: 60%;
float: right;
padding: 1em;
}

#sidebar {
float: left;
padding: 1em;
margin 0;
width: 30%;
color: #000;
background-color: gray;
}

Also a suggestion to use percentage or em for the heights and widths,
that way you have a scalable design.
 
R

Richard

chlori said:
Hi

The content div should be on the right of the menu div.
But it's below it instead.
In Mozilla it looks ok, but IE5 (Win) not. Is that a
browser bug or a mistake I made...?
Something wrong with float:left;?
Thanks
chlori

What you need is my fix for that. Maybe not "my" creation, but it keeps the
divisions from breaking down like that.

www.1-large-world.com/samples/sample1.html


Remove the "float:right;" from the "content" division. It's not needed.

For text presentation within a division, use padding, not margin.
Not sure why you want such a huge value for the margin-left in #content
anyway.
 
N

Neal

Hi

URL:
http://stuff.arto.ch/layout.php
http://stuff.arto.ch/style.css

The content div should be on the right of the menu div. But it's below
it instead.

In Mozilla it looks ok, but IE5 (Win) not. Is that a browser bug or a
mistake I made...?

Something wrong with float:left;?

Something quirky with how IE5 handles widths, most likely. The width of
the float and/or the content div are likely being miscalculated, leaving
no room for the content next to the float.

Google search on IE Box Model Hack.
 
R

Richard

Something quirky with how IE5 handles widths, most likely. The width of
the float and/or the content div are likely being miscalculated, leaving
no room for the content next to the float.
Google search on IE Box Model Hack.

Simple fix to that problem. See my sample posted in the other reply.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top