1. Home
  2. Computing & Technology
  3. Web Design / HTML

border-color

By Jennifer Kyrnin, About.com

border-color Description:

The border-color property defines the colors of the borders of the element.

border-color in CSS Versions:

border-color Syntax:

border-color: [ <color>{1,4} ] | inherit
The order is top, right, bottom, left.

border-color Initial Value:

The value of the color property.

border-color Applies To:

All elements.

border-color Inheritance:

This property is not inherited.

border-color Browser Support:

border-color Examples:

standard border-color

<p style="border-color : #c00;">
This paragraph has a red border.
</p>

top/bottom and right/left have different colors

<p style="border-color : #c00 #ccc;">
This paragraph has red horizontal borders and grey vertical.
</p>

border-color Special Notes:

  • If you don't set the border-style, the border will not display.

More border-color Information:

Return to the Style Library

Explore Web Design / HTML

More from About.com

  1. Home
  2. Computing & Technology
  3. Web Design / HTML
  4. CSS
  5. Style Properties
  6. CSS Style Property: border-color

©2008 About.com, a part of The New York Times Company.

All rights reserved.