12

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?

joel
  • 1,034
  • 9
  • 17

1 Answers1

14

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

You should use media queries to detect devices.

Community
  • 1
  • 1
Oleg Mikheev
  • 17,186
  • 14
  • 73
  • 95
  • 1
    so which one are handheld? so is it better to use the media queries to make sure all mobile is correct? – joel Dec 16 '11 at 14:35
  • handheld in my understanding are those running Opera Mini, but even with Opera Mini user may need to enable portable mode explicitly – Oleg Mikheev Dec 16 '11 at 14:38
  • 1
    `handheld` https://www.w3.org/TR/CSS21/media.html#media-types **is** actually part of media queries, so if they don't think to be handhelds don't see how it can help... – serge Nov 12 '18 at 10:34
  • 1
    This is a shame. It's literally the standard, why we still have to use width/height trickery for detecting handheld devices? – vintprox Feb 28 '19 at 07:26