New Zenner
- Join Date:
- Mar 2009
- Location:
- South America
- Posts:
- 3
- Plugin Contributions:
- 0
help implement scrip to load stylesheet depending on the user's screen resolution
Hi, first time user of zen cart 1.3.8.
I am getting ready to implent it, as my business home page, but first I want to change it´s looks to my taste.
Obviosly I´m not into web development, so I´m a complete noob at coding but I am persistent and I apreciate a bit more detailed help.
I want zen cart to automatically load a style sheet depending on users screen resolution, with the hopes to avoid the problem of graphics, logos and banner looking cut up or wrong, I tried the sliding door technique, but couldn´t get results I wanted because graphics design has to be a certain way.
I´ve used the code below on a simple html test page and worked pretty good. Yet I dont´t know where or how to implement it in zen cart.
**<HEAD>
<script type="text/javascript"> <!-- Begin /* Created by: Bob Pearson :: <http://www.pagecraft.on.ca> */ var winW = 0, winH = 0; if (parseInt(navigator.appVersion)>3) { if (navigator.appName=="Netscape") { winW = window.innerWidth-16; winH = window.innerHeight-16; } if (navigator.appName.indexOf("Microsoft")!=-1) { winW = document.body.offsetWidth; winH = document.body.offsetHeight; } } if (winW <= 1600) { document.write('<link rel="stylesheet" type="text/css" href="1600_stylesheet.css">'); } if (winW <= 1280) { document.write('<link rel="stylesheet" type="text/css" href="1280_stylesheet.css">'); } if (winW <= 1024) { document.write('<link rel="stylesheet" type="text/css" href="1024_stylesheet.css">'); } if (winW <= 800) { document.write('<link rel="stylesheet" type="text/css" href="800_stylesheet.css">'); } if (winW <= 640) { document.write('<link rel="stylesheet" type="text/css" href="640_stylesheet.css">'); } // End --> </script>**
PS: Please excuse my english, I´m a bit rusty !!! :no: