Glubase - share your knowledge


All / Computers / Programming / CSS





  • View Command

CSS Reference

CSS border-top-width definition

Browser support
IEFFOpSaf

Type:

Syntax

border-top-width: medium | thin | thick | <length>

Description

The border-top-width property specifies the width of the top border.

Values

Values Definition

thin

Sets a thin border.

medium

Default. Sets a thin border.

thick

Sets a thick border.
length<unit> For example: 5px. The unit can be any of px (pixels), mm (millimeters), cm(centimeters), in (inches), pt (points), pc (picas), em (the element's font height) or ex (the element's x-height). 

 

Example

[Try this example yourself]
<style type="text/css">
.style1
{
  border-top-style: solid;
  border-top-width: 1px;
}
.style2

  border-top-style: solid;
  border-top-width: thick;
}
</style>

<div class="style1">
  1 pixel width
</div>

<br />

<div class="style2">
  Thick width
</div>

Output

1 pixel width

Thick width
  • Comments

No comments added.