Lesson 5: Advanced CSS Layout

web08.psd

In this lesson, you’ll learn how to refine the appearance of your page layout by adding graphics, color, and additional page sections.

What you’ll learn in this lesson:

  • Using comments in cascading style sheets
  • Using background images
  • Creating navigation styles
  • Working with absolute positioning

Starting up

You will work with several files from the HTML5_05lessons folder in this lesson. Make sure you have loaded the HTML5lessons folder onto your hard drive from www.digitalclassroombooks.com/HTML5. See “Loading lesson files” in the Starting Up section of this book.

2609.jpg This lesson uses the TextWrangler text editor to create the markup, but you can use any text editor and get the same results.

Building your page layout

In this lesson, you will be working with the two-column fixed-width layout from Lesson 4. In Lesson 4, you added background colors to the various page elements. In this lesson, you will remove the background colors to unify the appearance of the page.

You will also create a more attractive and useful navigation bar, add more images, create a styled data table, and add form elements for a contact page. At the end of the lesson, you will look at a few alternative page layouts based on the one you create.

Removing the background color ...

Get HTML5 Digital Classroom now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.