Changing the Background

As you learned in Chapter 10 (“Changing the Text’s Background” and “More on Backgrounds”), you can style the background of the entire page and individual elements Image. This includes nearly every element, even forms and images (yes, an image can have a background image!).

Image First, you apply a background image to the outermost container, the div with id="container". Then you repeat it vertically (the y-axis). This is the long way to define background styles—specifying each property in its own declaration. In order to keep my code ...

Get HTML5 and CSS3: Visual QuickStart Guide, Seventh Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.