Target IE6, IE7, IE8


/ Published in: CSS
Save to your folder(s)



Copy this code and paste it in your HTML
  1. IE8 and Below
  2.  
  3. The key to targeting Internet Explorer 8 and below, with a hack, is to append "\9� to the end of your style. For example:
  4.  
  5. body {
  6. color: red; /* all browsers, of course */
  7. color : green\9; /* IE8 and below */
  8. }
  9.  
  10. E7 and Below
  11.  
  12. we can use the * symbol to target IE7 and below, like so:
  13.  
  14. body {
  15. color: red; /* all browsers, of course */
  16. color : green\9; /* IE8 and below */
  17. *color : yellow; /* IE7 and below */
  18. }
  19.  
  20. IE6
  21.  
  22. body {
  23. color: red; /* all browsers, of course */
  24. color : green\9; /* IE8 and below */
  25. *color : yellow; /* IE7 and below */
  26. _color : orange; /* IE6 */
  27. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.