CSS PROPERTIES
Expand All | Collapse All
CSS AT-RULES
Advertisements

CSS border-left Property

Topic: CSS3 Properties ReferencePrev|Next

Description

The border-left property sets the width, style, and color of the left border of an element. It is a shorthand property for setting the individual left border properties i.e. border-left-width, border-left-style, and border-left-color in a single declaration.

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-left: 
[ border-left-width border-left-style border-left-color ] | initial | inherit

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

h1 {
    border-left: 5px solid #ff0000;
}
p {
    border-left: 3px dotted #00ff00;
}

Property Values

The following table describes the values of this property.

Value Description
border-left-width Sets the width of the left border of an element.
border-left-style Sets the line style of the left border of an element.
border-left-color Sets the color of the left 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-left property.

Browser Compatibility

The border-left 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-left-color, border-left-style, border-left-width.

Advertisements
Bootstrap UI Design Templates Property Marvels - A Leading Real Estate Portal for Premium Properties