two CSS style for smartphone resolution
-
Hello, I tested the plugin WPtouch but that did not meet my expectations.
I need that when my site is accessed by mobile devices, it displays only the categories clearly visible. So I thought about using a javascript at the beginning of the WP index to interpret the resolution of the visitor is less than 600px and redirect to another page.
The script I’m using is this:if ($_GET[“op”] != “nomobile”) {
echo(‘<script type=”text/javascript”>
//<![CDATA[
if (screen.width <= 600) {
window.location.replace(“http://alternative-domain/”)
}
//]]>
</script>’);
}I did a test and opened a different page. But to my site set to open in a mobile device, I need to have two different style sheets, one for each type of resolution. I’m having trouble finding a way to do this. If you can load a second file of styles for those who use less than 600px resolution, I can almost ride a new template, just to access smarthphone, using the same database. Thanks if you can help. My site is http://autoguia.net
- The topic ‘two CSS style for smartphone resolution’ is closed to new replies.