Wed, 2014-04-30 21:34
I am trying to use the same webpage, but with a different CSS if the user is viewing it with a mobile device as opposed to a computer. I have the following in a CSS called mobile-choose, but it is not working...any thoughts?
/* Phone & Tablet */ @import url("mobile.css") only screen and (max-width:768px); /* Desktop */ @import url("regular.css") only screen and (min-width:769px);
Wed, 2014-04-30 23:48
#1
In the head
Try to place this in the head of your HTML file instead of inside your CSS file.
<style type="text/css"> @import url("mobile.css") only screen and (max-width:768px); @import url("regular.css") only screen and (min-width:769px); </style>
Then it should work.
Let us know if it fixed your problem.
Cheers,
Henk