CSS/Properties/border-top

From W3C Wiki
Jump to: navigation, search

border-top

The border-top property is a shorthand property for setting the width, style, and color of the top border of a box.

Description

Values [ <border-top-width> || <border-top-style> || <border-top-color> ] | inherit
Initial value See individual properties
Applies to all elements
Inherited No


Values

  • inherit
    Takes the same specified value as the property for the element's parent.


And see also individual properties


Example

Example A

[style.css]

 h1 {
   border-top: 1px solid red;
 }

[index.html]

  <body>
    <h1>CSS border property example</h1>
  </body>

Csslist2 border.png

CSS Reference

The CSS specification defines the border-top property in 8.5.4 Border shorthand properties.

See also