Reputation: 1500
i have a simple page which can be zoomed over the window phone, however i want to lock the zoom. any help how can i prevent webpage from zoom over window phone 8
here is the code
<html>
<head>
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>HI there</title>
<script type="text/javascript" src="jquery.js" ></script>
</head>
<body>
<div style="width:100%; height:100px; background:red;">
hi this is just the sample
</div>
</body>
</html>
Upvotes: 1
Views: 893
Reputation: 12138
<head>
<title>HI there</title>
<script type="text/javascript" src="jquery.js" ></script>
<!-- add the viewport tag -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<style>
/* not needed @-ms-viewport{
width: device-width;
} */
</style>
</head>
add initial-scale=1, maximum-scale=1,
to the viewport tag in the head
Upvotes: 1
Reputation: 1844
Have you tried adding maximum-scale=1
to that meta tag? See https://developer.mozilla.org/en-US/docs/Mozilla/Mobile/Viewport_meta_tag for more info.
Upvotes: 1