O'Reilly logo

iPhone JavaScript Cookbook by Arturo Fernandez Montoro

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

Creating a footer

The first recipe of this chapter shows how to create a main toolbar with a title. It seems useful to create a footer with some relevant information. Usually, a footer uses a small font and a different color to be different from the rest of the text in the same screen. Let's find out how to create a footer for our applications.

Getting ready

We'll use the iWebKit framework as it contains a specific CSS style for creating a footer with a consistent look for our applications.

How to do it...

As we have seen in the previous recipe, we can reuse our initial HTML file. You only need to add one line before the</body> tag with this content:

<div id="footer">This is the footer</div>

The following screenshot shows a simple footer:

Note that ...

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