1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2010
    Rep Power

    Css for iphone not getting used in safari

    I am having trouble trying to work out why on an iphone my css file never gets used.

    when a user arrives at my site with a screen size <= 1024 i apply a different style sheet using this function - http://www.kelvinluck.com/2006/05/sw...s-with-jquery/. i know this isnt a way of doing it for an iphone as you use user.agent but i am doing it for smaller screens at the same time.

    <link href="index.css" rel="stylesheet" title="screen" type="text/css" media="screen" />
            <link href="css/mobile.css" title="mobile" rel="alternate stylesheet" type="text/css" />
    that is how i order my stylesheets in my html. on opera on the iphone the css works fine but its just safari. on android the site works fine.

    any help would be really grateful

    thanks in advance
    Last edited by saunders1989; December 6th, 2010 at 07:41 AM.

IMN logo majestic logo threadwatch logo seochat tools logo