开发者

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?


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.


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]>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜