border-bottom

Description

This shorthand property defines the width, color, and style of the bottom border.

ItemValue
Initial value not specified
Inherited No.
Version CSS1
JavaScript syntax object.style.borderBottom="5px solid red"
Applies to All elements.

Syntax and Property Values


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

Example


<!DOCTYPE HTML>
<html>
<head>
<style>
span {<!--from  ww w  .  j  av  a  2  s. com-->
  border-bottom: 1px dotted black;
}
</style>
</head>
<body>
<p> 
    <span>Under 5</span>
</p> 
</body>
</html>

Click to view the demo

The code above generates the following result.

border-bottom




















Home »
  HTML CSS »
    HTML CSS Reference »




HTML Tag Reference
CSS Reference
CSS Selector Reference
Encoding Reference