CSS PROPERTIES
Expand All|Collapse All
CSS AT-RULES
SPONSORED LINKS

CSS border-bottom Property

Topic: CSS3 Properties Reference« Prev|Next »

Description

The border-bottom CSS property sets the width, style, and color of the bottom border of an element. It is a shorthand property for setting the individual bottom border properties i.e. border-bottom-width, border-bottom-style, and border-bottom-color at once.

The following table summarizes the usages context and the version history of this property.

Default value: See individual properties
Applies to: All elements
Inherited: No
Animatable: Yes, See individual properties. See animatable properties.
Version: CSS 1, 2, 3

Syntax

The syntax of the property is given with:

border-bottom: 
[ border-bottom-width border-bottom-style border-bottom-color ] | initial | inherit

The example below shows the border-bottom property in action.

  • h1 {
  •     border-bottom: 5px dashed #ff0000;
  • }
  • p {
  •     border-bottom: 3px dotted #00ff00;
  • }

Property Values

The following table describes the values of this property.

Value Description
border-bottom-width 
Sets the width of the bottom border of an element.
border-bottom-style Sets the line style of the bottom border of an element.
border-bottom-color Sets the color of the bottom border of an element.
initial Sets this property to its default value.
inherit If specified, the associated element takes the computed value of its parent element border-bottom property.

Browser Compatibility

The border-bottom property is supported in all major modern browsers.

Browsers Icon

Basic Support—

  • Firefox 1+
  • Google Chrome 1+
  • Internet Explorer 4+
  • Apple Safari 1+
  • Opera 4+

Further Reading

See tutorial on: CSS Border, CSS3 Border.

Related properties: border, border-bottom-color, border-bottom-style,
border-bottom-width.

 
Close

Your Feedback:

 

We would love to hear from you! Please say something.