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

Chapter 12. Box Properties > border Property

12.13. border Property

The border property is a type of “shortcut” property that can allow the Web author to set most, but not all, of the properties normally reserved for the other border sub-family of properties.

Using border, you can use all of the border styles you could normally set through the border-style property, set the width normally reserved for the border-width property, and set the color normally reserved for the border-color property. You cannot set the values normally associated with border-top, border-right, border-bottom, border-left, border-top-width, border-right-width, border-bottom-width and border-left-width. Put simply, you can only set global border values. This means border can only take one numerical or name value to substitute for border-width, and if you need to set one border value different than another, you will have to use border with one of the other properties that control that type of thing. In addition, when using border, you must set the border style to be displayed — without a typical border-style property value set, nothing is displayed. Listing 12.13, whose effects are illustrated in Figure 12-15, gives you an idea of how it works:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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