Hands On Practice 4.5 Exercise

Click Here to View Exercise

 


Chapter 4

Visual Elements and Graphics

Hands On Practice 4.5 P.140

In this exercise I learned about the following configurations for background images by using CSS.

  • background-color is a CSS code you can use to describe the background color.
  • background-image is a CSS code you can use to describe the background image.
  • background-repeat is a CSS code you can use to describe how you want a background image to tile.

Something new I learned was the fact that now you can repeat a background image more than one way by using CSS.

  • repeat-y - repeats an image horizontally
  • repeat-x - repeats an image verticially
  • no-repeat - does not repeat image

I applied this technique to my example website by using the following code in my h2 selector.

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;

}

Now from the example you should see a tiny flower that represents a bullet point at the beginning of each h2 selector.