VIRB

Friends, Music and Video... we're helping you stay connected.

[Elsewhere] Conditional-CSS

post a comment | posted Sep 2

Check this snippet out:

CSS:

  1. /* Conditional-CSS example */ 

  2. a.button_active, a.button_unactive { 

  3.    display: inline-block

  4.    [if lte Gecko 1.8] display: -moz-inline-stack; 

  5.    [if lte Konq 3.1] float: left

  6.    height: 30px; 

  7.    [if IE 5.0] margin-top: -1px; 

  8.      

  9.    text-decoration: none

  10.    outline: none

  11.    [if IE] text-decoration: expression(hideFocus='true')

  12. }


Ever wanted to write CSS like that? Then seek no further! Conditional-CSS is a little script which preprocesses your CSS to target the browser visiting the site. Neato! Available in PHP, C and C# flavors :)


View original post >>