3 replies [Last post]
arma
Offline
newbie
Last seen: 14 years 22 weeks ago
Joined: 2007-08-23
Posts: 3
Points: 0

Basicaly there is just 1 small problem in IE7 everything works as i wanted it to work but in Firefox my submenu are 40px further than it should be. Please look at this http://www.straddle.lv/cms/

I looked all around internet and didn't find any IE7 hacks only old ones like
html>body #class { prop } etc. but it's not working in IE7.

I just want to make property in css for firefox margin-left:-40px; but it shouldn't be visible to IE7 how can i do this ???

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 7 years 15 weeks ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

You don't need separate

You don't need separate styles; it's cos you haven't zeroed the margin and padding on the submenu <ul>s.

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

arma
Offline
newbie
Last seen: 14 years 22 weeks ago
Joined: 2007-08-23
Posts: 3
Points: 0

Omg your just briliant very

Omg your just briliant Laughing out loud very big thanks for this
didn't realize that one property pading: 0; could fix all my problems!

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 47 weeks 3 days ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

It's not just the padding.

It's not just the padding. IE and Opera use left margin to set the indent, while the Moz/Gecko family and Safari/Konqueror use left padding.

If you don't want an indention, zero both. If you do want an indent (other than the default 40px), zero one and set the other as you see fit.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.