Advertisement
Guest User

Untitled

a guest
Aug 1st, 2012
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. HTML How to check which browser is the html currently being viewed in?
  2. <!--[if lt IE 7]> <html class="ie6"> <![endif]-->
  3. <!--[if IE 7]> <html class="ie7"> <![endif]-->
  4. <!--[if IE 8]> <html class="ie8"> <![endif]-->
  5. <!--[if gt IE 8]><!--> <html> <!--<![endif]-->
  6.  
  7. <!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
  8. <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
  9. <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
  10. <!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
  11. <!-- Consider adding a manifest.appcache: h5bp.com/d/Offline -->
  12. <!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
  13.  
  14. <!DOCTYPE html>
  15. <html>
  16. <head><title>test</title></head>
  17. <body>
  18. <script>
  19. alert(navigator.userAgent);
  20. </script>
  21. </body>
  22. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement