2 replies [Last post]
kHiTe
Offline
newbie
Last seen: 19 years 43 weeks ago
Joined: 2003-06-06
Posts: 7
Points: 0

I have been playing around trying to teach myself some CSS.

One such page is:

http://www.khite.co.uk/CSS/Leftmenu/index.html

Mozilla seems to render this page how I want it to. However I.E.6 shifts the Leftmenu <div> too far to the left. It doesn't shift the Mainbodycutoutleft <div> too far left in the same way; which has confused me.

I have spent some time going round in circles and the CSS is probably not the tidiest in the world, but I would appreciate if anyone can point out what is going wrong.

T.I.A.

kHiTe
Offline
newbie
Last seen: 19 years 43 weeks ago
Joined: 2003-06-06
Posts: 7
Points: 0

A sollution

I noticed that, in IE, the element with a negative margin that did work was an inline element, wheras the element that did work was (rightly as far as I could see - being a box with a menu in it) a block level element.

I altered the style sheet so both elements are inline elements and now, even though IE seems to get the box widths wrong at least they line up.

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 1 week 4 days ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5344
Points: 2965

negative margin

Good find,
I'll have to look out for negative margins on inline elements.