Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
12-15-2012, 05:36 PM #1
- Join Date
- Dec 2012
- Thanked 0 Times in 0 Posts
device-width and 320px and HTC Evo
I am trying to design a mobile app to have a width of 320px (height no so important - happy for it to vary).
I have read various articles including:
...and noticed that setting the 'viewport' attribute with 'width=device-width' causes iphones and samsung phones to have a width of 320px.
I initially thought that this setting causes the browser to take the devices real width and divides it by the phone's pixel ratio, eg:
iphone3: pixel ratio:1, device-width: 320px so 320/1 = 320px.
iphone4: pixel ratio:2, device-width:640px so 640/2 = 320px
samsung 1: pixel ratio:1.5, device-width:480px so 480/1.5 = 320px.
But, HTV evo kills this theory as follows: pixel ratio:1.5, device-width:480px so 480/1.5 = 320px BUT in reality is has a reported width of 360px!
I was wondering if the author of your related article:
...or anyone else could explain to me why the HTC Evo gives this unexpected width when using 'width=device-width'?