RkBlog

Hardware, programming and astronomy tutorials and reviews.

Android update for CSS media queries

New config for Android based mobile decives

If you are using CSS media queries to use custom CSS for mobile devices then you might want to know that newer Android versions (starting from 2.3 or 2.2) won't use max-device-width. Instead they use -webkit-device-pixel-ratio, like so:

<link rel="stylesheet" media="screen and (-webkit-device-pixel-ratio:0.75)" href="style_mobile.css" />

RkBlog

18 October 2011;

Comment article