I recently developed a mobile version for a website and just want to be able to modify the CSS file if a browser is detected on a mobile device. You can look at my previous attempts here , but now I decided that the most feasible way to do this would be to focus on Media Queries.
The problem I have here is that the media inquiries just don't work. It always loads the default stylesheet. Here is the code I have:
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link href="../css/style.css" id="stylesheet" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" media="only screen and (max-width: 480px), only screen and (max-device-width: 480px)" href="../css/style_mob.css" />
Am I missing something with this code? I tried using the many tutorials offered for this, but no one helps me. I really came to a standstill, so any help would be greatly appreciated.
source
share