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

border-top

By Jennifer Kyrnin, About.com

border-top Description:

The border-top property is a shorthand tag to define all the top border style properties of an element.

border-top in CSS Versions:

border-top Syntax:

border-top: [ <border-top-width> || <border-style> || <color> ] | inherit

border-top Initial Value:

Not defined for shorthand properties.

border-top Applies To:

All elements.

border-top Inheritance:

This property is not inherited.

border-top Browser Support:

border-top Examples:

standard border-top

<p style="border-top : 2em solid #c00;">
This paragraph has a 2 em solid red top border.
</p>

border-top Special Notes:

  • If you omit the color value, the color will be the same as the color value for the element.

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

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

All rights reserved.