Change Stylesheet by Resolution

Home

Change stylesheet for different screen resolutions

<noscript>
<link media="screen" href="sheetA.css" type="text/css" rel="stylesheet">
</noscript>
<script type="text/javascript" language="JavaScript1.2">
<!--
var resWidth = window.screen.width;
if(resWidth > 800) {
  document.write("<link media=\"screen\" href=\"sheetB.css\" type=\"text\/css\" rel=\"stylesheet\">");
}
else if(resWidth <= 800) {
  document.write("<link media=\"screen\" href=\"sheetA.css\" type=\"text\/css\" rel=\"stylesheet\">");
}
//-->
</script>