AV1611 Posted September 24, 2008 Share Posted September 24, 2008 This doesn't work if you use in in the <head><style> section: <!--[if IE]> div.menus { margin-top: 13px; } <!--[endif]--> How can I change the padding to div.class? I want to margin-top to be 12px unless it's IE, then I want it 13px instead, cause M$ can't add I tried it inline: <div class="whatever" <!--[if IE]-->style="margin-top: 13px;"<!--[endif]-->> but then it just echo's the tag like text. So, the question really is, how do I set the margin-top of an element to 12 unless it's IE, then I want 13 instead? Link to comment https://forums.phpfreaks.com/topic/125629-conditional-if-ie/ Share on other sites More sharing options...
AV1611 Posted September 24, 2008 Author Share Posted September 24, 2008 Part 2: And, is outlook express = IE? I am sending out an html newletter, and I have a 1px error in outlook express 6, but works great in evolution, thunderbird, etc... Link to comment https://forums.phpfreaks.com/topic/125629-conditional-if-ie/#findComment-649534 Share on other sites More sharing options...
haku Posted September 25, 2008 Share Posted September 25, 2008 <!--[if IE]> div.menus { margin-top: 13px; } <!--[endif]--> Your closing tag should be: <![endif]--> And the code inside needs to be in style tags, unless that conditional comment is already inside style tags. Link to comment https://forums.phpfreaks.com/topic/125629-conditional-if-ie/#findComment-650863 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.