Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Hour 5. Building Your First Mobile Site > Adding a Header and Footer

Adding a Header and Footer

I know what you are thinking: “That’s not a site, that’s a sentence!” Let’s add a header and a footer to make it feel a bit more like a real site.

In Listing 5.2 we add a header section to the site.

Listing 5.2 The Mobile Site with a Header Section Added


 1: <!DOCTYPE html>
 2: <html>
 3:   <head>
 4:     <title>My first mobile site</title>
 5:     <meta name="viewport" content="width=device-width, initial-scale=1">
 6:     <link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.css"/>
 7:     <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
 8:     <script src="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.js"></script>
 9:   </head>
10:   <body>
11:     <div data-role="page">
12:       <div data-role="header">
13:         My First Mobile Site
14:       </div>
15:       <div data-role="content">
16:         Welcome to my first mobile site.
17:       </div>
18:     </div>
19:   </body>
20: </html>


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial