how to load an external css file if javascript is disabled.
Should work in IE 6 to 9, Firefox Google chrome, Safari
I tried <noscript>
And keeping <noscript>
inside but it's not working in IE 7
how to load an external css file if javascript is disabled. Should work in IE 6 to 9, Firefox Google chrome, Safari I tried |
|||
|
I'd do it the other way around. Always load the css which will contain rules prefixed with This way of "discovering capabilities" is approximately how http://www.modernizr.com/ works. |
|||||||||||||||||||||
|
I've tested this method in IE7, and it works. Putting
EDIT: Here's a screenshot of this working in IE7.
|
|||||||||||||||||||||
|
Try this:
Hack, but it is correct with HTML.
If JS is enabled then comment start control tag is printed into page - then second start tag is ignored and ending tag closes commented content.
So if JS is enabled |
|||||||||
|
while
But by myself I would prefer the method posted by cherouvim |
|||||
|
CSS-Files have nothing to do with enabled/disabled javascript...
|
|||