CSS/Properties/border-top-color

From W3C Wiki
< CSS‎ | Properties
Revision as of 17:59, 19 July 2011 by Plehegar (Talk | contribs)

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

border-top-color

The border-top-color property sets the color of the top border of a box.

Description

Values <color> | transparent | inherit
Initial value the value of the 'color' property
Applies to all elements
Inherited No


Values

  • <color>
    The color can be specified as a hexadecimal RGB value, a regular RGB value, or by using one of the pre-defined color keywords.


  • transparent
    The border is transparent (though it may have width).


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


Example

Example A

[style.css]

 h1 {
   border-top-color: red;
   border-right-color: black;
   border-bottom-color:red;
   border-left-color: black;
   border-width: 1px;
   border-style: solid;
 }

[index.html]

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

Csslist2 border-color.png

CSS Reference

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

See also