|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Detecting browsers that do not support CSS
Hello,
I'm working on a site with a very complex layout, lots of pics and rollovers, etc. I have always used tables to achieve the positioning and layout of the page, but the time has come to give that up and use CSS layers to do the site's look. I want to use javascript to detect older browsers that don't support CSS, and redirect users to an alternative no-CSS version of my site. My question is what is the best way to use javascript to detect css support in a browser? if( /* no css support */ ) { //redirect them to the no-css site } else { //let em through } |
|
#2
|
|||
|
|||
|
<script>
if (document.all || document.layers || document.getElementById){ document.write("<LINK REL="StyleSheet" HREF="" type="text/css">"); <!--Support CSS--> }else{ document.write("<LINK REL="StyleSheet" HREF="" type="text/css">") <!--Non CSS Browser--> } </script> i found this on google what do you guys think? |
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > Detecting browsers that do not support CSS |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|