Back to CSS1 Reference | CSS1 Properties
Prev border-style | Next border-top-width


Property
border-top
Values
<border-top-width>, <border-style>, <color>
Initial
not defined for shorthand properties
Inherited
no

This is a shorthand property for setting the width, style and color of an element's top border.

      H1 { border-bottom: thick solid red }

The above rule will set the width, style and color of the border below the H1 element. Omitted values will be set to their initial values:

      H1 { border-bottom: thick solid }

Since the color value is omitted in the example above, the border color will be the same as the 'color' value of the element itself.

Note that while the 'border-style' property accepts up to four values, this property only accepts one style value.

Log in or register to write something here or to contact authors.