IE6 wierdness - paste this HTML and look?!

Soldato
Joined
12 Dec 2006
Posts
3,421
Location
Worthing, West Sussex
Get the html from either of these sites, and paste it into a html file:

http://pastebin.ca/526690
http://paste.uni.cc/15957

Ignore the sloppy code - it's just to demonstrate the problem ;)

Basically, in FF or IE7 it's fine. But in IE6, if a div tag has a HEIGHT property set, and the div tag falls in between two floating items, the div tag gains 4px left & right margin! :confused:

Strange, huh... Any smart ideas on getting round this? I've managed a bit of a bodge using conditional IE statements but it's not exactly ideal. Maybe a different approach is needed.
 
Last edited:
i didn't bother looking at the html but what your saying doesn't sound out of the blue for ie6.

Things like extra margin on ie6 is simple to fix, just put _ before the css and only ie6 will read it, so say in ff you want a border of 60px, but ie6 only 40px, just do the following

margin: 60px;
_margin: 40px;

If your new to web building you will eventually get used to the annoying thing called ie6 and know what problems you are going to face and how to quickly fix them.
 
Nah I'm not new to web building, 'tis my job :p

Thing with fixing it though, it will fix it when it's in between the two floating div's, but then as you've added that extra width, as soon as it's away from the floats it'll go to the expected with plus the extra width you put in the ie6 hack :( Which is what I've done, but I can't think of any smart way to fix it both next to the floats and away from the floats...

IE6 is rubbish - one of the few things more annoying than big brother :D
 
Back
Top Bottom