I'm currently making a website for mobile devices. In style.css I got
#mobilepicture {
display: none;
}
#stockpicture {
float: left;
position: relative;
top: -65px;
left: 100px;
}
This is a part of the mobile.css:
#stockpicture {
display: none;
}
#mobilepicture {
...
}
When switching over to mobile.css everything seems okey (mobilepicture is displayed, stockpicture display:none), until I tilt my phone sideways. When I do that the stockpicture changes to be displayed again. I know it's because of the selector in the beginning:
index.php:
<link rel="stylesheet" type="text/css" href="mobile.css" media="screen and (max-width: 480px)" />
<link rel="stylesheet" type="text/css" href="style.css" media="screen and (min-width: 481px)" />
<meta name="viewport" content="user-scalable=no, width=device-width" />
</head>
<!-- Head end-->
<!-- Body start-->
<body>
<!-- stockpicture-->
<div id="stockpicture">
<img src="images/stockpicture.png" alt="stockpicture"/>
</div>
<!-- stockpicture end-->
<!-- Start Container-->
<div class="container">
<!-- Content start -->
<div id="contentindex">
<!-- Mobile picture-->
<div id="mobilepicture">
<img src="images/mobilepicture.png" alt="mobilepicture" width="200" height="300"/>
</div>
<!-- Mobile end -->
<h2> Home </h2>
<p>Snippet.</p> </div>
<!-- end .container --></div>
Is there any other way to solve this? or possibly deny the browser to rotate?
Cheers JJ