Glubase - share your knowledge


All / Computers / Programming / CSS





  • View Command

CSS Reference

CSS border-width definition

Syntax

border-width: thin | medium | thick | <length> {1,4}

Description

The border-width property specifies the width of the border of a table.

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-style: solid; /* add a border to div element. */
  border-width: 1px;
}
.style2

  border-style: solid; /* add a border to div element. */
  border-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.