Zeke Franco

Digital stalking made easy.

Here you can find most of my what I’m doing around the Web. All of my series of tubes point here—at least the tubes with feeds.

I posted to zekefranco.com

In reply to Bruce Lawson's “Two tips for iPhone developers”

His commenting system stripped out some of the code example so here's my full comment.

Original article: Two tips for iPhone developers

You don't have to do sniffing you can create separate styles and deliver it like this.

@media only screen and (max-device-width: 480px) {
  selector {

or via a separate style sheet like this

<!--[if !IE]>--> <link href="small-screen.css" rel="stylesheet" type="text/css" media="only screen and (max-device-width: 480px)" /> <!--<![endif]-->

By using specific style sheets you are just enhancing the experience for a subset of users. Which is a good thing. If the user's browser doesn't understand the the special style sheet the will just get the regular (or mobile) style sheet.

The same thing can be down with javascript you can enhance the content based on the user's device. You just need to make sure the JavaScript your using is supported by running some tests.

I don't hear people complaining about how some Web sites deliver CSS3 and HTML5 to browsers that can understand it. For example IE7 won't get text-shadow but Safari users will. Content is still there it's just you've added some nice details for people who have a progressive browser.


| Leave a Comment »

  1. 1
  2. 2
  3. 3
  4. 4