1. Computing & Technology

Discuss in my forum

border-top

By , About.com Guide

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:

©2012 About.com. All rights reserved.

A part of The New York Times Company.