O'Reilly logo

HTML5 and CSS3: Visual QuickStart Guide, Seventh Edition by Bruce Hyslop, Elizabeth Castro

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

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 ...

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