Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FIX CSS <!--[if lt IE 8]> in IE

How can I use this:

    <!--[if lt IE 8]>     <style type='text/css'>   #header ul#h-menu li a{font-weight:normal!important}     </style>     <![endif]--> 

If I remove <!--[if lt IE 8]><![endif]-->, above code'll run good in IE 8, but if I don't do it, it wont run. Help me with fixed IE, so that I can use above code in all IE versions.

I want the code #header ul#h-menu li a{font-weight:normal!important} to run only in IE.

like image 698
meotimdihia Avatar asked Oct 18 '10 12:10

meotimdihia


1 Answers

If you want this to work in IE 8 and below, use

<!--[if lte IE 8]> 

lte meaning "Less than or equal".

For more on conditional comments, see e.g. the quirksmode.org page.

like image 120
Pekka Avatar answered Sep 20 '22 23:09

Pekka