IE7-specific CSS

Soldato
Joined
18 Oct 2002
Posts
7,139
Location
Ironing
Hello all,

I'm up against a small CSS problem that only manifests itself in IE7. I have a list where each list item has an image background that is meant to line itself up to a border line on it's right. I have a conditional comment in the HTML that loads an iehacks.css stylesheet - with this, I have managed to get this looking right in FF, Opera, IE6, IE5.5 and IE5.01. IE7 however pushes each list item 2px too far to the left. The hacked IE css for the LI is:

Code:
#topbit li {
        margin-left: -16px;
        voice-family: "\"}\"";
        voice-family: inherit;
        margin-left: 0px;
}

This sets a -16px margin-left for IE, which corrects IE5.5 and IE5.0. These then can't parse the 0px settings, so IE6 and IE7 gets this. Looks fine in IE6, 2 pixels out in IE7.

Is there anything I can do to set a margin-left: 2px; for IE7 only? Something IE6 will ignore?
 
Back
Top Bottom