Sams Teach Yourself HTML, CSS & JavaScript Web Publishing in One Hour a Day

(singke) #1
ptg16476052

Image Backgrounds 221

9


CSS provides a number of options for controlling how backgrounds are applied. The
background-repeat property is used to specify how background images are tiled.
Options include repeat (the default, which tiles the image horizontally and vertically),
repeat-x (tile horizontally only), repeat-y (tile vertically only), and no-repeat. In
Figure 9.15, I’ve altered the

so that the background image does not repeat:



An element with a background.



FIGURE 9.14
An element with a
tiled background.


FIGURE 9.15
An element with a
nonrepeating back-
ground.

Free download pdf