• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Lesson 2. Using CSS Rules > Other Shorthand Properties

Other Shorthand Properties

The background property combines background-color, background-image, background-repeat, background-attachment, and background-position as shown in Listing 2.18.

Listing 2.18. CSS Code Highlighting a Shorthand background Property

h1, h2
{
    text-align: center;
    color: navy;
}

h1
{
    border: 1px solid gray;
    background: yellow url(tint.jpg) repeat-y 100% 0;
}

h2
{
    font: italic small-caps bold 100%/120% arial, helvetica,
sans-serif;
}

p
{
    color: maroon;
    font: 80% arial, helvetica, sans-serif;
    padding: 1em 2em 3em 4em;
}


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint