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

Chapter 2. Mastering CSS > Understanding CSS Shorthand

Understanding CSS Shorthand

Options are an inherent part of CSS. This is true of everything from the styles that define your page to the individual style properties that define the styles. While most CSS properties have only one form, there are several that can stand in for multiple other properties. These “shorthand properties” allow you to define a whole slew of styles in a single line of code (Table 2.2).

Table 2.2. CSS Shorthand
ShorthandEquivalents
borderborder-width
 border-style
 border-color
border-topborder-top-width
 border-top-style
 border-top-color
border-rightborder-right-width
 border-right-style
 border-right-color
border-bottomborder-bottom-width
 border-bottom-style
 border-bottom-color
border-leftborder-left-width
 border-left-style
 border-left-color
fontfont-style
 font-variant
 font-weight
 font-size
 line-height
 font-family
list-stylelist-style-type
 list-style-position
 list-style-image
backgroundbackground-color
 background-image
 background-repeat
 background-attachment
 background-position
marginmargin-top
 margin-bottom
 margin-left
 margin-right
paddingpadding-top
 padding-bottom
 padding-left
 padding-right



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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