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

border

By Jennifer Kyrnin, About.com

border Description:

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

border in CSS Versions:

border Syntax:

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

border Initial Value:

Not defined for shorthand properties.

border Applies To:

All elements.

border Inheritance:

This property is not inherited.

border Browser Support:

border Examples:

standard border

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

border Special Notes:

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

More border Information:

Return to the Style Library

Explore Web Design / HTML

More from About.com

  1. Home
  2. Computing & Technology
  3. Web Design / HTML
  4. About.com Web Design A to Z
  5. Books
  6. About Web Design Book
  7. AWD: Chapter 12
  8. CSS Style Property: border

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

All rights reserved.