Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / CSS

border-bottom-width — bottom border thickness

The border-bottom-width property sets the thickness of an element’s physical bottom border. It accepts a nonnegative length or thin, medium, or thick. Width alone does not display a border: a style other than none or hidden is also needed.

Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required

Syntax

border-bottom-width: <length [0,∞]> | thin | medium | thick;

border-bottom-width sets the thickness of the physical bottom border, regardless of writing direction. It does not change the line’s color or style. Its initial value is medium, and the property is not inherited.

Allowed values are nonnegative lengths, such as 0, 2px, and 0.2em, and the keywords thin, medium, and thick. The cited specifications define these as 1px, 3px, and 5px, respectively. Negative values and percentages are invalid. CSS-wide keywords such as inherit, initial, and unset are also available.

If border-bottom-style is none or hidden, the used thickness is zero, even when a positive length is declared. The initial style is none, so setting the width alone does not show a line. A later border-bottom, border-width, or border shorthand can override this property according to the cascade.

Examples

<!doctype html>
<html lang="en">
<meta charset="utf-8">
<title>border-bottom-width</title>
<style>
  .sample {
    border-bottom-style: solid;
    border-bottom-color: #000;
    border-bottom-width: 6px;
  }
</style>
<p class="sample">Bottom border</p>
</html>

Result

Bottom border

The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.

Sources