Sachindra
Sachindra

Reputation: 7029

Stylesheet for Firefox only

Is it possible to mention some style elements that work only with Firefox? Can I get the same for margin elements in specific? Hope I am clear enough in my question?

Upvotes: 1

Views: 807

Answers (2)

Kyle
Kyle

Reputation: 67244

This great jQuery plugin can do just that!

Check out the CSS Browser selector.

You can use a class selector in your CSS to tell it which browser to aim at:

.ff3 .myDiv
{
  mystyles
}

I use it and it works great :)

Although it should be said that if it's wrong in Firefox, it's probably some wrong coding and you should fix it without using any targeted CSS. Usually you need to fix IE, and for that you can use Conditional Comments.

Upvotes: 3

GustyWind
GustyWind

Reputation: 3036

you can use conditional tags to specify what CSS to be used by your browser.

  <![if !IE]>
     <link rel="stylesheet" href="${realpath}/$csspath/style_common.css" type="text/css">
     <link rel="stylesheet" href="${realpath}/$csspath/style_default.css" type="text/css">
    <![endif]>

Upvotes: -2

Related Questions