Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 2nd, 2012  |  syntax: None  |  size: 1.86 KB  |  hits: 21  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. /*
  2.  Comprehensive List of Browser-Specific CSS Hacks
  3.  http://paulirish.com/2009/browser-specific-css-hacks/
  4. */
  5.  
  6. /***** Selector Hacks ******/
  7.  
  8. /* IE6 and below */
  9. * html #uno  { color: red }
  10.  
  11. /* IE7 */
  12. *:first-child+html #dos { color: red }
  13.  
  14. /* IE7, FF, Saf, Opera  */
  15. html>body #tres { color: red }
  16.  
  17. /* IE8, FF, Saf, Opera (Everything but IE 6,7) */
  18. html>/**/body #cuatro { color: red }
  19.  
  20. /* Opera 9.27 and below, safari 2 */
  21. html:first-child #cinco { color: red }
  22.  
  23. /* Safari 2-3 */
  24. html[xmlns*=""] body:last-child #seis { color: red }
  25.  
  26. /* safari 3+, chrome 1+, opera9+, ff 3.5+ */
  27. body:nth-of-type(1) #siete { color: red }
  28.  
  29. /* safari 3+, chrome 1+, opera9+, ff 3.5+ */
  30. body:first-of-type #ocho {  color: red }
  31.  
  32. /* saf3+, chrome1+ */
  33. @media screen and (-webkit-min-device-pixel-ratio:0) {
  34.  #diez  { color: red  }
  35. }
  36.  
  37. /* iPhone / mobile webkit */
  38. @media screen and (max-device-width: 480px) {
  39.  #veintiseis { color: red  }
  40. }
  41.  
  42.  
  43. /* Safari 2 - 3.1 */
  44. html[xmlns*=""]:root #trece  { color: red  }
  45.  
  46. /* Safari 2 - 3.1, Opera 9.25 */
  47. *|html[xmlns*=""] #catorce { color: red  }
  48.  
  49. /* Everything but IE6-8 */
  50. :root *> #quince { color: red  }
  51.  
  52. /* IE7 */
  53. *+html #dieciocho {  color: red }
  54.  
  55. /* Firefox only. 1+ */
  56. #veinticuatro,  x:-moz-any-link  { color: red }
  57.  
  58. /* Firefox 3.0+ */
  59. #veinticinco,  x:-moz-any-link, x:default  { color: red  }
  60.  
  61. /* FF 3.5+ */
  62. body:not(:-moz-handler-blocked) #cuarenta { color: red; }
  63.  
  64.  
  65. /***** Attribute Hacks ******/
  66.  
  67. /* IE6 */
  68. #once { _color: blue }
  69.  
  70. /* IE6, IE7 */
  71. #doce { *color: blue; /* or #color: blue */ }
  72.  
  73. /* Everything but IE6 */
  74. #diecisiete { color/**/: blue }
  75.  
  76. /* IE6, IE7, IE8 */
  77. #diecinueve { color: blue\9; }
  78.  
  79. /* IE7, IE8 */
  80. #veinte { color/*\**/: blue\9; }
  81.  
  82. /* IE6, IE7 -- acts as an !important */
  83. #veintesiete { color: blue !ie; } /* string after ! can be anything */
  84.  
  85. /* IE8, IE9 */
  86. #anotherone  {color: blue\0/;} /* must go at the END of all rules */