CSS conditional comments for browsers other than IE?

So far I know conditional comments are supported only for different versions of IE.

On the other hand, can we provide conditional comments for other browsers as well.

If so, how? If not, what could be a better alternative?

+5
source share
6 answers

Look at the CSS browser plug-in selection . I use it on my site, you basically just write CSS and specify in which browser you want to configure it. I use it on my site and it works great!

Hope this helps.

0
source

CSS IE.. Firefox:

Firefox .

<!--[if !IE]>
  ...statements...
<![endif]-->

" ", ...

<![if !IE]>
  ...statements...
<![endif]>

, Firefox css..

<![if !IE]>

  <link href="css/ff.css" rel="stylesheet" type="text/css" />

<![endif]>

, , -.

+3

, CSS IE. , . ?

+1

IE IE.

Javascript .

, IE , .

W3.org , IE, ( ).

+1

, , IE, . JS- - .

, IE , :

<!--[if gt IE 8]><!-->
<link href="sample.css" rel="stylesheet" type="text/css" />
<!--><![endif]-->

As you can see from the syntax underscore, the link element is not commented out, so it will be visible to browsers other than IE, and for IE it will follow the condition (more than IE 8 in this example).

0
source

I would like this to be a solution, especially for email rendering engines. There are even conditional comments for Outlook, but not for Gmail.

<!--[if gte mso 9]>

<![endif]-->
0
source

All Articles