This shorthand property defines the width, color, and style of the bottom border.
Item | Value |
---|---|
Initial value | not specified |
Inherited | No. |
Version | CSS1 |
JavaScript syntax | object.style.borderBottom="5px solid red" |
Applies to | All elements. |
border-bottom: border-width border-style border-color;
The property values are listed in the following table.
Value | Description |
---|---|
border-bottom-width | Set the width of the bottom border |
border-bottom-style | Set the style of the bottom border |
border-bottom-color | Set the color of the bottom border |
inherit | Inherit the border-bottom property from the parent element |
border-bottom |
Yes | Yes | Yes | Yes | Yes |
An example showing how to use border-bottom CSS property.
<!DOCTYPE HTML>
<html>
<head>
<style>
span {<!-- w ww . ja v a 2 s . c om-->
border-bottom: 1px dotted black;
}
</style>
</head>
<body>
<p>
<span>Under 5</span>
</p>
</body>
</html>