Web Development and Design Foundations with XHTML, 5th Edition

(Steven Felgate) #1
4.3 Using Graphics^141

files in the Chapter4/starters folder. Save the images in your trilliumch4 folder. When
you are completed with this exercise, your page should look similar to the one shown in
Figure 4.21.


Launch Notepad and open index.html.


Modify the style rule for the h2selector and configure the background-imageand
background-repeatproperties. Set the background image to be trilliumbullet.gif. Set
the background to not repeat. The h2selector style rules follow:


h2 { background-color: #d5edb3;
color: #5c743d;
font-family: Georgia, "Times New Roman", serif;
padding-left: 30px;
background-image: url(trilliumbullet.gif);
background-repeat: no-repeat;
}


Save your page as index.html. Launch a browser and test your page. It should look sim-
ilar to the one shown in Figure 4.21. The student files contain a sample solution in the
Chapter4/4.5 folder.


Figure 4.21
The background image in the

areas is configured with background-repeat: no-repeat

Free download pdf