7

I'm building a website at the moment, where I need the use of Modernizr, but for some reason it doesn't apply the classes to the html-tag as it should..

My code looks like this:

<!doctype html>
<!--[if lt IE 7]><html class="no-js ie6 oldie" lang="en"><![endif]-->
<!--[if IE 7]><html class="no-js ie7 oldie" lang="en"><![endif]-->
<!--[if IE 8]><html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--><html class="no-js" lang="en"><!--<![endif]-->
<head>
<script src="http://cdn.hosting4real.com/js/modernizr/modernizr.js"></script>
</head>

Anyone that knows how to get it working?

Best regards,

LucasRolff
  • 1,228
  • 3
  • 11
  • 20
  • What classes is it failing to apply? How are you determining that it is not doing so? What browsers are you testing in? – Quentin Oct 20 '11 at 11:38
  • It doesn't apply any classes at all, only the no-js, I'm testing it in 'view source' in chrome, safari, and opera – LucasRolff Oct 20 '11 at 11:48

1 Answers1

10

View source shows (unsurprisingly) the source code for the page. It doesn't show a live view of the current state of the DOM. If you want that, use a DOM viewer (you'll find one built into most browsers and via the Firebug plugin for Firefox).

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335