handheld css does not work properly

joel picture joel · Dec 16, 2011 · Viewed 8.5k times · Source

on my site i have 3 css

<link rel="stylesheet" type="text/css" media="screen" href="screen.css" />
 <link rel="stylesheet" type="text/css" media="print" href="print.css" />
 <link rel="stylesheet" type="text/css" media="handheld" href="handheld.css" />

i thought the media handheld will automatically load my site formated for devices

when i load my site with my android, i still see the "site.css" why it does not load the handheld.css?

Answer

Oleg Mikheev picture Oleg Mikheev · Dec 16, 2011

Apparently Android/iPhone/Nokia browsers don't think that they are handhelds.

You should use media queries to detect devices.