My site has a fluid design between 800px and 1280px. (I appreciate many display resolutions exceed this now).
In 10 inch tablets the site displays best with a viewport width set at 800px allowing the tablet to scale this to its window size. This way fonts are a decent size and images are not much affected by blurring given the small display.
Desktop browsers ignore the viewport meta tag and display between 800px and 1280px, and a background beyond this.
IE10 on Windows 8 however implements the viewport tag on both desktops and tablets and therefore implements the 800px layout on desktops. This results in unacceptably blurred images and giant text on larger displays.
Using CSS the best I approach I have been able to find is something like this (assuming the Windows Surface has a width of 1366px):
@media screen and (max-width: 1023px) {
@-ms-viewport { width: 800px; }
}
@media screen and (min-width: 1024px) and (max-width: 1366px) {
@-ms-viewport { width: 1024px; }
}
@media screen and (min-width: 1367px) {
@-ms-viewport { width: device-width; }
}
This still means desktops will have zoomed images and text unless the display exceeds 1366px resolution. Using max-device-width in the media query does not seem to offer much given that the Surface has a similar native resolution to many desktops.
Alternatively, I could detect the tablet and set the viewport width with Javascript or detect it with PHP and deliver a different stylesheet.
No doubt there is a better way to do this, preferably with CSS?
Thanks, appreciate any suggestions.