O'Reilly logo

HTML5 iPhone Web Application Development by Alvin Crespo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Form styling for iOS

In this section we look at styling our form. If we currently test out our form on an iOS device or even a desktop browser, it won't be pretty. In fact you might be a little upset at how ugly it really is. So, let's style it and make everyone happy. We'll start with basic styling that helps achieve a good look. Then we'll consider how we can customize our components using CSS3 features.

Basic styling

Styling forms is pretty easy. We can simply use the elements themselves, but there is a single "gotcha". You might notice the fact that we've specified [type="datetime"] in one of our selectors. This is because the datetime input type shows a select menu type of UI in iOS and thus, the typical input selector won't apply. Otherwise, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required