Posted By

jesudasjj on 01/28/11


Tagged

css hack


Versions (?)

css hacks


 / Published in: CSS
 

URL: http://www.1stwebdesigner.com/design/useful-css-snippets/

  1. /* IE 6 */
  2. 2
  3. * html .yourclass { }
  4. 3
  5.  
  6. 4
  7. /* IE 7 */
  8. 5
  9. *+html .yourclass{ }
  10. 6
  11.  
  12. 7
  13. /* IE 7 and modern browsers */
  14. 8
  15. html>body .yourclass { }
  16. 9
  17. .WhtHappening .upComingGig {margin-top: -5px\0/;}
  18. 10
  19. /* Modern browsers (not IE 7) */
  20. 11
  21. html>/**/body .yourclass { }
  22. 12
  23.  
  24. 13
  25. /* Opera 9.27 and below */
  26. 14
  27. html:first-child .yourclass { }
  28. 15
  29.  
  30. 16
  31. /* Safari */
  32. 17
  33. html[xmlns*=""] body:last-child .yourclass { }
  34. 18
  35.  
  36. 19
  37. /* Safari 3+, Chrome 1+, Opera 9+, Fx 3.5+ */
  38. 20
  39. body:nth-of-type(1) .yourclass { }
  40. 21
  41.  
  42. 22
  43. /* Safari 3+, Chrome 1+, Opera 9+, Fx 3.5+ */
  44. 23
  45. body:first-of-type .yourclass { }
  46. 24
  47.  
  48. 25
  49. /* Safari 3+, Chrome 1+ */
  50. 26
  51. @media screen and (-webkit-min-device-pixel-ratio:0) {
  52. 27
  53. .yourclass { }
  54. 28
  55. }

Report this snippet  

You need to login to post a comment.