formatting sites for mobile devices

#1
[eluser]bigtimslim[/eluser]
I am getting ready to create mobile versions of a few sites (probably just use a stysheet). I know that you can tell mobile devices to use a specific css file with the following html:

Code:
<link rel="stylesheet" href="mobile.css" type="text/css" media="handheld" />

However, this doesn't work for me when I switch to iphone 3 useragent. From further research, I have read that this way often doesn't work. Any thoughts? Should I just detect mobile with CI and load the needed sheet?

#2
[eluser]gyo[/eluser]
You can try the is_mobile() function in the User Agent Class.

#3
[eluser]Unknown[/eluser]
[quote author="gyo / suashi" date="1280854562"]You can try the is_mobile() function in the User Agent Class.[/quote]

Thank you it works very fine, i searched many months of this code^^


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.