CSS border-bottom-style

The border-bottom-style property in CSS specifies the style of the bottom border of an element. This property provides options to set various styles, such as solid, dotted, dashed, and more, to enhance the appearance of the element’s bottom border.


Syntax of border-bottom-style

</>
Copy
border-bottom-style: none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset | initial | inherit;

Values

ValueDescription
noneNo border is displayed.
hiddenSimilar to none, but resolves border conflicts in table elements.
dottedA dotted border is displayed.
dashedA dashed border is displayed.
solidA single solid border is displayed.
doubleTwo solid lines are displayed as the border.
grooveA border that appears carved into the page (opposite of ridge).
ridgeA border that appears raised from the page (opposite of groove).
insetA border that makes the element appear embedded.
outsetA border that makes the element appear coming out of the page.
initialSets the property to its default value (none).
inheritInherits the value from its parent element.

Default Value

none


Examples for border-bottom-style

Using the CSS border-bottom-style Property

The following examples demonstrate how to use the border-bottom-style property with different values to style the bottom border of an element.

</>
Copy
/* Set the bottom border to solid */
.element {
  border-bottom-style: solid;
}

/* Set the bottom border to dashed */
.element {
  border-bottom-style: dashed;
}

/* Set the bottom border to double */
.element {
  border-bottom-style: double;
}

/* Inherit the bottom border style from the parent */
.element {
  border-bottom-style: inherit;
}

Example for a Dashed Bottom Border

Below is an example demonstrating how to use border-bottom-style: dashed to apply a dashed border to the bottom of an element:

index.html

</>
Copy
<!DOCTYPE html>
<html lang="en">
<head>
<style>
  .decorated {
    border-bottom-width: 4px;
    border-bottom-style: dashed;
    background: yellow;
  }
</style>
</head>
<body>

<h1 class="decorated">Dashed Bottom Border</h1>

</body>
</html>

Example for a Solid Bottom Border

border-bottom-style: solid;

</>
Copy
<!DOCTYPE html>
<html lang="en">
<head>
<style>
  .decorated {
    border-bottom-width: 4px;
    border-bottom-style: solid;
    background: yellow;
  }
</style>
</head>
<body>

<h1 class="decorated">Solid Bottom Border</h1>

</body>
</html>

Example for a Dotted Bottom Border

border-bottom-style: dotted;

</>
Copy
<!DOCTYPE html>
<html lang="en">
<head>
<style>
  .decorated {
    border-bottom-width: 4px;
    border-bottom-style: dotted;
    background: yellow;
  }
</style>
</head>
<body>

<h1 class="decorated">Dotted Bottom Border</h1>

</body>
</html>

Example for a Double Bottom Border

border-bottom-style: double;

</>
Copy
<!DOCTYPE html>
<html lang="en">
<head>
<style>
  .decorated {
    border-bottom-style: double;
    background: yellow;
  }
</style>
</head>
<body>

<h1 class="decorated">Double Bottom Border</h1>

</body>
</html>

Browser Support

The border-bottom-style property is supported in most modern browsers. Below is a compatibility table:

BrowserVersion
Chrome1.0
Edge5.5
Firefox1.0
Safari1.0
Opera9.2