Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

CSS border-top property


May 05, 2021 CSS Reference Manual


Table of contents


CSS border-top property


Style the top border:

p
{
border-style:solid;
border-top:thick double #ff0000;
}

Try it out . . .

Description of property definition and use

Border-top short-write properties set all the properties of the top border to a declaration

The following properties can be set in order: border-top-width, border-top-style, and border-top-color.

If you don't set one of these values, there's no problem, such as border-top:solid #ff0000; It is also allowed.

Default: not specified
Inheritance: no
Version: CSS1
JavaScript syntax: object .style.borderTop="3px solid blue"


Browser support

The numbers in the table support the first browser version number of the property.

Attributes
border-top 1.0 4.0 1.0 1.0 3.5

The property value

Value Describe
border-top-width Specify the width of the top border. See also: Possible values in border-top-width.
border-top-style Specify the style of the top border. See also: Possible values in border-top-style.
border-top-color Specify the color of the top border. See also: Possible values in border-top-color.
inherit Specifies that the settings of the border-top property should be inherited from the parent element.


Related articles

CSS tutorial: CSS Border