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

border-top-color

By Jennifer Kyrnin, About.com

border-top-color Description:

The border-top-color property defines the color of the top border of the element.

border-top-color in CSS Versions:

border-top-color Syntax:

border-top-color: <color> | transparent | inherit

  • color
    A specific color.
  • transparent
    The color of the element beneath it shows through the border.
  • inherit
    The element should have the same border-top-color setting as the parent.

border-top-color Initial Value:

The value of the color property.

border-top-color Applies To:

All elements.

border-top-color Inheritance:

This property is not inherited.

border-top-color Browser Support:

border-top-color Examples:

standard border-top-color

<p style="border-top-color : red; border-top-width:1em; border-top-style: solid;">
This paragraph has a red top border.
</p>

border-top-color Special Notes:

  • Colors can be defined as hexadecimal (#ff0000), RGB (rgb(255,0,0)), or color names (red).

More border-top-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-top-color

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

All rights reserved.