LoginSignup
5
6

More than 5 years have passed since last update.

firefoxのハックにおける注意点

Posted at

firefoxでハックした場合、IE7はfirefoxのハックの値に引っ張られるので注意

例えば

#aaa { border:1px solid black; width:200px; padding:20px; margin:40px;}
#aaa, x:-moz-any-link { width:400px; }

と書くと

firefoxとIE7
ScreenClip.png

その他のブラウザ
ScreenClip2.png

こうなる。
IE7には、firefoxの値(400px)が適用されているのが分かる。

回避するためにはfirefoxのハック内に*で更にIEハックを入れることで解決。
ちなみにIE7のみで、IE6は大丈夫だった。

#aaa { border:1px solid black; width:200px; padding:20px; margin:40px;}
#aaa, x:-moz-any-link { width:400px; *width:200px;}
5
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
6