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; } 

The list-style property combines list-style-type, list-style-position, and list-style-image as shown in Listing 2.19.

Listing 2.19. CSS Code Highlighting a Shorthand list 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; } ul {     list-style: square inside; } 




Sams Teach Yourself CSS in 10 Minutes
Sams Teach Yourself CSS in 10 Minutes
ISBN: 0672327457
EAN: 2147483647
Year: 2005
Pages: 234
Authors: Russ Weakley

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net