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/switch-stylesheets-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.
ive tried doing that but have had no luck… the odd thing is that it works fine in opera on the iphone but not in safari. ive read that the iphone wants to read media=“screen” first and will load all css files that have that connected but i dont but that is also the default
i dont think that will work as i already have a standard stylesheet which always appears instead of my mobile stylesheet. when a screen is greater than 1024 the stylesheet index is applied and when it is smaller mobile is applied. the problem is safari on an iphone doesnt like that. it always displays the index.css
What is the media query on your “index.css” file? (might want to rethink the name of that. most people use style.css. You don’t want people to think it only styles index.php)