border-left-style
Definition
border-left-style is a CSS property that sets the style of the left border of an element.
Examples
This will create a solid border on the left side of the element with the class example
.example {
border-left-style: solid;
}
This will create a border on the left side of the element with the class example that is made up of a series of short lines
.example {
border-left-style: dashed;
}
This will create a border on the left side of the element with the class example that is made up of two solid lines. The border will be twice as wide as a single solid border
.example {
border-left-style: double;
}
Values
Value | Description |
---|---|
none | No border is drawn |
hidden | Same as none , but has different usage |
dotted | Border is a series of dots |
dashed | Border is a series of short lines |
solid | Border is a solid line |
double | Border is two solid lines |
groove | 3D groove is drawn |
ridge | 3D ridge is drawn |
inset | 3D inset is drawn |
outset | 3D outset is drawn |
Best Practices
- Use the none value when you don't want to draw a border on the left side of an element.
- Use the solid value for most border styles, as it is the most widely supported value.
- Use the double value if you want a border that is double the width of a single solid border.
Browser Compatibility
Chrome | Firefox | Safari | Internet Explorer | Microsoft Edge | Opera |
---|---|---|---|---|---|
Yes | Yes | Yes | Yes | Yes | Yes |