border top width

Education is not limited to just classrooms. It can be gained anytime, anywhere... - Ravi Ranjan (M.Tech-NIT)

CSS border-top-width Property


Set the width of the top border:

    border-style: solid;
    border-top-width: 15px;


Definition and Usage

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

Note: Always declare the border-style property before the border-top-width property. An element must have borders before you can change the width.

CSS Syntax

border-top-width: medium|thin|thick|length|initial|inherit;

Property Values

Value Description  
medium Specifies a medium top border. This is default  
thin Specifies a thin top border  
thick Specifies a thick top border  
length Allows you to define the thickness of the top border