Daniel Hunter
Daniel Hunter

Reputation: 2866

apply alternate style sheet to handheld, not working right

I have two style sheets for one page.

<link rel="stylesheet" href="css/lsharecomplete_mob.css" media="handheld" type="text/css" />
<link rel="stylesheet" href="css/lsharecomplete_dt.css" type="text/css" media="Screen" />

I am testing on android and Iphone, and both seem to be picking up the "screen" style. Is it better to use @media in one style sheet instead of using alternate sheets or am I doing something wrong.

I have checked the link and server directories to make sure the files existed and where linked properly.

Upvotes: 3

Views: 2758

Answers (2)

sascha
sascha

Reputation: 4690

You have to load the handheld style AFTER your standard style. Otherwise everything from your mobile design will be overwritten.

Upvotes: 0

alex
alex

Reputation: 490153

iPhone's Mobile Safari doesn't consider itself of the "handheld" media type.

iOS ignores print and handheld media queries because these types do not supply high-end web content. Therefore, use the screen media type query for iOS.

Source.

Instead, use media queries.

Upvotes: 1

Related Questions