CSS/Properties/border-color

From Web Education Community Group
< CSS‎ | Properties
Revision as of 11:25, 20 November 2011 by Rworth (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

border-color

The border-color property is a shorthand property for setting 'border-top-color', 'border-right-color', 'border-bottom-color', and 'border-left-color' at the same place in the style sheet.

Description

Values [ <color> | transparent ]{1,4} | inherit
Initial value See individual properties
Applies to all elements
Inherited No


Values

  • [ <color> | transparent ]{1,4}


  • inherit
    Takes the same specified value as the property for the element's parent.


And see also individual properties


Example

Example A

[style.css]

 h1 {
   border-width: 1px;
   border-style: solid;
   border-color: red black
 }

[index.html]

  <body>
    <h1>CSS border property example</h1>
  </body>

Csslist2 border-color.png

CSS Reference

The CSS specification defines the border-color property in 8.5.2 Border color.

See also