Mobile and Tablet Marketing

CSS Optimization for iPod and iPhone Safari

ipod touch and iphoneBuilding out applications that are optimized for iPod or iPhone use is a great way to dip into an exploding market with over 1 billion downloads to date. It’s important to realize that those numbers don’t include browser-based applications that are optimized for Safari on iPhone or the iPod Touch and require no download.

Today I bit the bullet and purchased a 16Gb iPod Touch to begin checking out the platform for both Safari and Apps. Sure… I was excited that I can watch movies on the road and the iPod Touch can act as a remote for my AppleTV, too!

My first task at hand was updating my Salary Calculator for use with Safari on the iPod Touch or the iPhone. It’s an application I’ve built in virtually every language… so it’s time that I began learning development for Safari and learning the Apps framework.

Interestingly enough, bringing up the page in Safari didn’t automatically utilize the media=handheld css settings, so I had to write some server-side scripting in PHP to use the appropriate stylesheet:

>link rel="stylesheet" media="screen" href="iphone.css" type="text/css" />
>?php } else { ?>
>link rel="stylesheet" media="screen" href="style.css" type="text/css" />
>?php } ?>

I’ve got the page looking pretty good, but I know there’s a ton of iPhone and iPod Safari CSS arguments I can utilize, even shifting components based on whether the page’s orientation is landscape or portrait. I’ll continue to experiment!

Got an iPhone or iPod Touch? Try out the Salary Calculator and let me know how it looks for you! Keep in mind virtually all the changes between the page were made with CSS only! It may have been easier to simply write an entirely new page – but not as challenging.

Douglas Karr

Douglas Karr is the founder of the Martech Zone and a recognized expert on digital transformation. Douglas has helped start several successful MarTech startups, has assisted in the due diligence of over $5 bil in Martech acquisitions and investments, and continues to launch his own platforms and services. He's a co-founder of Highbridge, a digital transformation consulting firm. Douglas is also a published author of a Dummie's guide and a business leadership book.

Related Articles


  1. I have to get myself an iphone, I don’t even have an ipod touch. I am going to get lost with the css and stuff though, anything with code is out of my league lol

What do you think?

This site uses Akismet to reduce spam. Learn how your comment data is processed.


Adblock Detected

Martech Zone is able to provide you this content at no cost because we monetize our site through ad revenue, affiliate links, and sponsorships. We would appreciate if you would remove your ad blocker as you view our site.