41 of 313 menu

The border-left property

The border-left property specifies a color, type, and width for a left border. It is a shorthand property for border-left-width, border-left-style and border-left-color.

Syntax

selector { border-left: width type color; }

The order of the properties does not matter.

Example

Let's give the element a black left border with 2px width:

<div id="elem"></div> #elem { border-left: 2px solid black; background: #f9f9f9; width: 300px; height: 100px; }

:

See also

byenru