Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
As you learned earlier in this chapter, you can use background images to act as a sort of wallpaper in a container element, so that the text or other images appear on top of this underlying design.
The basic style properties that work together to create a background are as follows:
• background-color—Specifies the background color of the element. Although not image-related, it is part of the set of background-related properties.
• background-image—Specifies the image to use as the background of the element using the following syntax: url('imagename.gif').
• background-repeat—Specifies how the image should repeat, both horizontally and vertically. By default (without specifying anything), background images will repeat both horizontally and vertically. Other options are repeat (same as default), repeat-x (horizontal), repeat-y (vertical), and no-repeat (only one appearance of the graphic).