Reputation: 396
I have a smartphone with display specification as 720x1280. But, when I make a sample webpage and add javascript
window.width
I get 340.
Why is that?
Upvotes: 0
Views: 48
Reputation: 1031
you should probably look into ur view port, try adding this
<meta name=”viewport” content=”width=device-width; initial-scale=1.0; maximum-scale=1.0; user- scalable=0;” />
that will ensure that ur document is will fill the device screen, essentially make one ccs pixel equal to one device pixel
Upvotes: 1