i’m creating a site and i should use different css for different device (pc, ipad, iphone)
it is possible to know which device people use to select the css???
i’m creating a site and i should use different css for different device (pc,
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The best info you have on what platform/device your users are viewing the site on is the browser version, available in the HTTP header. Mobile devices may say they’re using Chrome (on an Android phone) or IE (on a Windows Mobile phone), but you should be able to discover from the version information that it’s a mobile version of the browser.
You could use JavaScript to dynamically set styles, or a server-side script (ASP, JSP, PHP) to load CSS scripts. What you have to work with depends on what your site is written in. Be aware that making the mobile device run a large JS script to dynamically set styles will not be very performant on a mobile device.