DH Templates

How to use CSS for mobile browser compatibility when you already use CSS for main site?

I have a huge series of websites for my boss which we want to make more mobile-friendly. My thought was that I could say: <link href="http://*****/templates/css/global.css" rel="stylesheet" type="text/css" /> <link href="http://******/templates/css/blue2.css" rel="stylesheet" type="text/css" /> <link rel="stylesheet" href="http://*******/mobile.css" type="text/css" media="handheld" /> and that it would specify "use the regular css normally, use the other one on a mobile device." Can you use CSS for mobile if you already use CSS? or would it be better to put little mobile linkers on each page. Sorry, I had left off a line. Thanks for comments so far. I will look at the website that was linked.

Public Comments

  1. Please read this article in it's entirety. http://www.oreillynet.com/wireless/2004/02/06/mobile_browsing.html After you've done such, come back and ask your questions. Thank you.
  2. Yes, you can. But if you want the mobile.css to replace the other 2 css which you want to use only for a regular computer screen, add a medai attribute to the other 2 <link>s: media="screen" Otherwise, the first 2 css will apply to all screen and the 3rd css will also apply to handheld devices. By add the screen media type to the first 2 css, they will apply only to a regular computer screen, and only the 3rd css will apply to handhelds.
Powered by Yahoo! Answers