Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IE conditional in the stylesheet

I am trying to line up the top border of a content div with the bottom borders of an <li> list used for navigation right above (like a tabbed pane). In IE the alignment (or the margin I set) is off by 1 pixel.

Is there any way, directly within the css so that I don't have to create a separate IE stylesheet, to put a condition that will set the margin to IE's liking? OR, if the issue I'm having with IE being off by 1 pixel jumps out at you I'd love to hear why so that I can avoid the IE hack altogether (I know I haven't posted any code yet). Thanks!

like image 209
aeq Avatar asked Dec 18 '25 08:12

aeq


1 Answers

Yes, there is.

.myclass { *margin: 1px; }

This works for IE6 and IE7, do you need a hack for any other specific version?

like image 123
Sergey Ilinsky Avatar answered Dec 21 '25 02:12

Sergey Ilinsky



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!