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

CSS border-left-style Property

Topic: CSS3 Properties Reference« Prev|Next »

Description

The border-left-style CSS property sets the style of an element's left border individually. However in many cases the shorthand CSS properties like border-style or border-left are more convenient to use and preferable.

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

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

Syntax

The syntax of the property is given with:

border-left-style: 
none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset | inherit

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

  • p {
  •     border-left-style: dashed;
  •     border-left-width: 3px;
  • }

Property Values

The following table describes the values of this property.

Value Description
none No border will be displayed.
hidden Same as none, except the case where table cells have collapsed borders and the two cells share a border. The hidden value ensures that no border is drawn, since hidden take precedence over all other border styles.
dotted Displays the border as a series of dots.
dashed Displays the border as a series of short line segments i.e. dashes.
solid Displays the border as a single solid line.
double Displays the border as a two parallel solid lines with some space between them. The sum of the two lines and the space between them equals the value of border-width.
groove Displays the border as it were carved into the canvas. It gives the impression of 3D that is typically achieved by creating a shadow from two colors that are slightly lighter and darker than the border-color.
ridge Displays the border that has the opposite effect of groove. It also gives the impression of 3D, the border looks as though it were coming out of the canvas.
inset Displays the border that makes the element's box look as though it were embedded in the canvas. It gives the impression of 3D that is typically achieved by creating a shadow from two colors that are slightly lighter and darker than the border-color.
outset Displays the border that has the opposite effect of inset. It also gives the impression of 3D, the border makes the box look as though it were coming out of the canvas.
inherit If specified, the associated element takes the computed value of its parent element border-left-style property.

Browser Compatibility

The border-left-style 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+
 

Warning:Internet Explorer 7 and earlier versions don't support the value hidden. IE8 supports, but requires a <!DOCTYPE>. IE9 and above supports the hidden value.


Further Reading

See tutorial on: CSS Border, CSS3 Border.

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

 
Close

Your Feedback:

 

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