View Full Version : CSS Layout not working in IE 5

02-22-2004, 04:54 AM
Ok, some of you may have seen my other thread in genereal web building, but anyways, I am having a bit of a problem getting this site to work in IE 5.


Basically, due to IE5 not supporting CSS or doctypes properly, my code is causing the right had navigational menu to start below the content block. Its to do with the XHTML 1.0 box model I think, and the way padding works.

As you can see, it validates XHTML 1.0 strict at the moment, which is good, and I want to keep it that way. I know of a method for loading an alternate stylesheet in ie. The:


method which use the CSS in IE but not in any other browser. The problem is my site works in IE6, so using that method would cause it to break in IE 6 becuase of how I would have to use the CSS.

Finally, I dont want to use any form of javascript to detect browser ect.

This is alot I know, but does anyone have any suggestions on how I could make it work in IE5?


02-22-2004, 11:33 PM
this is just another reminder of what a pain in the *** web design really is. html is easy, but coding for 50 different browsers isn't. sucks, good luck in your journey.

02-22-2004, 11:43 PM
actually i think i have a way to overcome the problem.

its becuase of the IE box model, but if i remove all padding and then add more padding to the paragraph elements then it will stay at its fixed width and as the paragraphs are arent fixed width, it *should* solve the problem.

02-23-2004, 04:34 PM
That, or use any one of the numerous CSS hacks to supply IE5.x/win with the appropriate value for width; see the HTML & CSS Documentation (http://www.codingforums.com/showthread.php?s=&threadid=20862) sticky on top of this forum for more info, or try the infamous Box Model Hack (http://www.tantek.com/CSS/Examples/boxmodelhack.html) by Tantek Çelik.

02-23-2004, 08:12 PM
Erm... did you fix it already, because it looks fine in IE5.0 :confused:

02-23-2004, 08:18 PM
hmm... doesnt on my machine, and at school which is running IE 5

The exact version i believe is 5.0.1 Service Pack 2

02-23-2004, 08:23 PM


02-23-2004, 08:33 PM
thats very odd. What resolution are you at (although it shouldnt make much difference)?

Very odd, looks like this on mine:

02-23-2004, 08:34 PM
1024x768. I'm running IE5 alongside IE4, IE5.5 and IE6 but again, that shouldn't matter :confused:

What does anyone else get?

02-23-2004, 08:37 PM
same here.

ok, when you rollover the menu items does the item indent itself very slightly (2px) or does it stay static.

02-23-2004, 08:38 PM
Indents. I assume that's intentional as Fx does the same.

02-23-2004, 08:47 PM
hmm, on my IE 5.0.1 SP2 it doesnt have any effect onmouseover which is odd. I know its like this at school aswell.

02-24-2004, 09:54 PM
Ive managed to get it working now.

My original idea didnt work, as I had already done that during the design process, so there wasnt any padding to change, but in the end what I did was changed the width of the right hand content block from 140px to 130px (this made it line up in IE5), then I added 10px left padding which made it look more central in IE6 and Mozilla. The design looks very slightly different (the menu is more in the center) but i think it looks better like that anyway so im happy.

If you want to have a look to see how I did it or at the css you can goto:

http://www.freeipb.net/ibe/index.html and get the source, and:
http://www.freeipb.net/ibe/emotion.css for the CSS file.