CSS Hack to Target Firefox 3.5+?

Firefox 3.5 now supports the nth- * pseudo-class, which was what I used to configure my css for Safari and Chrome. Now Firefox also reads this data, causing minor layout problems. Does anyone know a way to specifically configure FF 3.5+?

BODY:nth-of-type(1) #topsearch input[type=submit] /* Safari 3.1+ and Chrome */ { 
     height:19px 
}
+3
source share
8 answers

How about this, I tested it in Safari 4, and the height is 19 pixels, in Firefox 3.5 the height is displayed as 39 pixels.

<style>

BODY:nth-of-type(1) #topsearch input[type=submit] /* Safari 3.1+ and Chrome */ { height:19px }      
BODY:nth-of-type(1) #topsearch input[type=submit], x:-moz-any-link, x:default { height: 39px; }

</style>
+5
source

CSS Browser Selector lets you write CSS for specific browsers without worrying about hacks. I can not recommend it highly enough.

+5
source

"" CSS . , - , IE waaaay CSS- ( ), CSS .

, IE... ... ( )... , .

, ... .

<head>
  <style>
    body.safari form input{
      /*special styles for Safari*/
    }
    body.firefox form input{
      /*special styles for Firefox*/
    } 
    body.firefox.v3-5 form input{
      /*special styles for Firefox 3.5*/
    } 
</style>
</head>
<body>
  <script>
    //run code here, that sets the class and or id attribute on the body tag...
  </script>

... , ; -)

+4

, "BODY: nth-of-type (1)..." YUI CSS. "body: first-of-type...".

0

PHP os, . .

0

http://rafael.adm.br/css_browser_selector/

:

( '/2')? + ff2 ': is (' firefox/3 ')? g +' ff3 '

:

( '/2')? + FF2 ': (' /3.5 ') G +? ff3_5 ': is (' firefox/3 ')? g +' ff3 '

PS: 3.x, :

( '/2')? + FF2 ': (' /3.5 ') G +? ff3_5 ': (' /3.6 ') G +? ff3_5 ': (' /3.8 ') G +? ff3_5 ': is (' firefox/3 ')? g +' ff3 '

0

:

@media screen and (-webkit-min-device-pixel-ratio:0){
    #topsearch input[type=submit] { height:19px; }
}}

WebKit, Gecko Trident.

0

. Firefox 3.5+ :

/* Firefox 3.5 and newer */

_:-moz-handler-blocked, :root .selector { property:value; }

, CSS: http://browserstrangeness.bitbucket.org/css_hacks.html#firefox

!

0

Source: https://habr.com/ru/post/1713147/


All Articles