Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to specify different Css for different Mobiles (BB, Iphone, Nexus... )

How to specify different Css for different Mobiles (BB, Iphone, Nexus... )

Problem

I am currently developing a Mobile web application in ASP.net and jQuery + jQm that will be used on handheld devices. I want to be able to specify a theme for Blackberry, one for Google Nexus and one for IPhone, and not just this ones.

Is there any way I could specify a theme for each one in CSS3? Can you please point out what to do in this case. Also I want that when I rotate screen to keep the design in place for all the devices above.

I am currently experimenting with this :

@media screen and (orientation:landscape) and (max-width: 819px) 

but I am open for other approaches also.

Thanks!

Problem courtesy of: radu florescu

Solution

You can either check the browser user agent by using javascript or through server-side code.

I recommend this mobile phone detector

Solution courtesy of: Daniel Ziga

Discussion

View additional discussion.



This post first appeared on CSS3 Recipes - The Solution To All Your Style Problems, please read the originial post: here

Share the post

How to specify different Css for different Mobiles (BB, Iphone, Nexus... )

×

Subscribe to Css3 Recipes - The Solution To All Your Style Problems

Get updates delivered right to your inbox!

Thank you for your subscription

×