6. Why make your site
work with the iPhone?
❖ A big market
❖ Getting bigger all the time
7. Who’s the Market?
Oceania
Western Europe
North America
Latin America
Eastern Europe
Asia
Africa
20 40 60 80 100
iPhone Android Palm Pre
Smartphone OS Share by region based on ad requests, December 2009 — metrics.admob.com
8. Starting off
❖ You have a site
❖ Content
❖ Menu
❖ Header
❖ Footer
9. Starting off
❖ You have a site
❖ Fixed width or fluid?
❖ Side or top navigation?
10. Starting off
❖ You have a site
❖ Fixed width or fluid
❖ Side or top navigation?
11. Starting off
❖ You have a site
❖ Fixed width or fluid
❖ Side or top navigation
12. How the world sees the iPhone
❖ Portrait
❖ 320 px wide by 356 px high
❖ 320 px wide by 140 px high with keyboard
❖ Landscape
❖ 480 px wide by 208 px high
❖ 480 px wide by 46 px high with keyboard
14. The Viewport
❖ Default is 980 px wide
❖ You need to say how wide your site actually is
❖ Via HTML’s “<meta>” tag
15. The Viewport
❖ Apple says
<meta name = "viewport"
content = "width = device-width" />
❖ Another approach
<meta name = "viewport"
content = "width = 560" />
❖ Just play with it
16. Custom CSS
❖ One magic line of HTML
<link rel="stylesheet"
href="iphone.css" type="text/css"
media="only screen and
(max-device-width:480px)" />
❖ Then add your styles to the custom CSS file
24. Data Entry
Text <input type="text" />
Telephone <input type="tel" />
URL <input type="url" />
Email <input type="email" />
<input type="text"
Zip Code
pattern="[0-9]*" />
25. An Icon of Your Own
❖ Create a square graphic
❖ No need to be fancy
❖ Name it apple-touch-icon.png
❖ Put it in your root directory
26. Getting Out in the
World
mailto Launches Mail
tel Calls a phone number
sms Launches Messages
maps.google.com Launches Google maps
www.youtube.com Launches YouTube
27. Examples
<p>Call us: <a href="tel:
1-707-555-1212">1-707-555-1212</a></
p>
<p>Visit us: <a href="http://maps.google.com/
maps?ll=38.61,-122.87&z=16">Find us on the
map</a></p>
28. Going Forward
❖ CSS 3
❖ Gradients
❖ Animations
❖ HTML 5
❖ Video, and more...