I am trying to adapt a tablet application for use on mobile phones. The functionality of Media Query seems perfect, and my initial testing confirms this. I have a question: with phones and tablets that change orientation from portrait to landscape (when the device rotates), what does max-width mean?
In other words, large Android phones have 480x800 resolutions, iPhone4 has a resolution of 640x960, and the original Blackberry Torch has a resolution of 360x480. These are all resolutions (W x H) when the devices are held in portrait mode, so the widths are 400, 640 and 360, respectively. However, when you rotate the device to the landscape, the height "becomes" the width for display purposes. Thus, the effective width in the landscape then becomes 800, 960 and 480, respectively, and the width of 800 and 960 overlaps with the width of the landscape of the tablet, which will ruin the display.
So, is width always width? That is, when a device reports its measurements, does the width value always remain unchanged for CSS purposes, or does the width value change when the device rotates to landscape?
Thank you all in advance.
source share