CSS border-top-styleProperty


Example

Set the top border style:

p
{
border-style:solid;
border-top-style:dotted;
}

Try it Yourself »

Property Definition and Usage Instructions

The border-top-style property sets the top border style of an element.

Default value: not specified
Inheritance: no
version: CSS1
JavaScript Syntax: object.style.borderTopStyle="dotted"


Browser Support

The numbers in the table indicate the first browser version number that supports the property.

Property
border-top-style 1.0 5.5 1.0 1.0 9.2

Property value

Value Description
none Define no border.
hidden Same as "none". However, except when applied to tables, where for tables, hidden is used to resolve border conflicts.
dotted Defines a dotted border. Rendered as solid in most browsers.
dashed Defines a dashed border. Rendered as solid in most browsers.
solid Define a solid line.
double Defines a double border. The width of the double line equals the value of border-width.
groove Defines a 3D grooved border. The effect depends on the value of border-color.
ridge Defines a 3D ridged border. The effect depends on the value of border-color.
inset Defines a 3D inset border. Its effect depends on the value of border-color.
outset Defines a 3D outset border. Its effect depends on the value of border-color.
inherit Specifies that the border style should be inherited from the parent element.
 

Related Articles

CSS Tutorial:CSS Border

CSS Reference Manual:border-top Property

other extensions