I'm having trouble fixing some spacing issues in i.e 5.5 and 6. Its seems to be a pretty obvious case of the old ie box model but my usual fix of "width" and "w/idth" doesn't seem to be working. Does anyone know of a better/different fix and, if possible, of a good tutorial with examples.

  • If I were you, I wouldn't worry about IE5.5. The rates of people using IE5.5 are well less than a percent and those that are... Darryl Hein about 10 years ago

3 answers


The best approach would be to serve these browsers an IE-specific stylesheet called from a conditional comment. That way you don't have to use any hacks, just provide different values as necessary. You only need to include the properties which are different in the extra stylesheet.

Answered about 10 years ago by Richard Grevers

Check it out at this tutorial. I used to use this technique to hack box model bug in IE5.5

But in your case i don't think it's the box model bug. Because IE6 has the same box model as the other. The problem should come from double margin bug for more detail please check this tutorial.

This will happen only when you use margin on float element in IE6 it will double your margin. So you have to hack it to reduce the margin to half of it in IE6.

Answered about 10 years ago by Reungyos Vorajenwanich

horizontal padding should be avoided for early IE's - margin the contained instead of padding the container. it's the quickest way round the issue.

if you need a width on a floated element also set it to display:inline; that fixes several float bugs.

and if you need to use hacks for early IE's also use conditional comments to keep your main CSS files clean.

you should also run your html through a validator before hunting for CSS bugs.

there are several block level elements inside inline elements (divs inside a's) which might cause issues in some browsers.

Answered about 10 years ago by Tony Crockford