Easy Tutorial
❮ Pr Tab Table Layout Css3 Pr Border Radius ❯

CSS border-top-style Property

Example

Set the top border style:

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

Property Definition and Usage

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

Default value: not specified
Inherited: no
--- ---
Version: CSS1
--- ---
JavaScript syntax: object.style.borderTopStyle="dotted"
--- ---

Browser Support

The numbers in the table specify the first browser version that fully supports the property.

Property Chrome IE Firefox Safari Opera
border-top-style 1.0 5.5 1.0 1.0 9.2

Property Values

Value Description
none Defines no border.
hidden Same as "none", except for table elements, where it resolves border conflicts.
dotted Defines a dotted border. Most browsers render it as a solid line.
dashed Defines a dashed border. Most browsers render it as a solid line.
solid Defines a solid border.
double Defines a double border. The width of the double line is equal to the value of border-width.
groove Defines a 3D grooved border. The effect depends on the border-color value.
ridge Defines a 3D ridged border. The effect depends on the border-color value.
inset Defines a 3D inset border. The effect depends on the border-color value.
outset Defines a 3D outset border. The effect depends on the border-color value.
inherit Specifies that the border style should be inherited from the parent element.

Related Articles

CSS Tutorial: CSS Border

CSS Reference: border-top Property

❮ Pr Tab Table Layout Css3 Pr Border Radius ❯