CSS border-left-color کی خاصیت

Definition and Usage

The border-left-color sets the color of the left border of the element.

Only pure colors can be defined, and the border can only appear when the border style is not none or hidden.

Note:Always declare the border-style attribute before the border-color attribute. The element must obtain the border before you change its color.

See Also:

CSS Tutorial:CSS ਬੋਰਡਰ

CSS Reference Manual:border-left Attribute

HTML DOM Reference Manual:borderLeftColor Property

Example

Set the color of the left border:

p
  {
  border-style:solid;
  border-left-color:#ff0000;
  }

Try It Yourself

CSS Syntax

border-left-color: color|transparent|initial|inherit;

Attribute Value

Value Description
color_name Specifies the border color as a color name (e.g., red).
hex_number Specifies the border color as a hexadecimal value (e.g., #ff0000).
rgb_number Specifies the border color as an rgb code (e.g., rgb(255,0,0)).
transparent Default Value. The border color is transparent.
inherit Specifies that the border color should be inherited from the parent element.

Technical Details

Default Value: not specified
Inheritance: no
Version: CSS1
JavaScript Syntax: object.style.borderLeftColor="blue"

More Examples

Set the color of the left border
This example demonstrates how to set the color of the left border.

Browser Support

The numbers in the table indicate the first browser version that fully supports this attribute.

ਕਰੋਮ IE / ਐਜ਼ ਫਾਇਰਫਾਕਸ ਸਫਾਰੀ ਓਪਰਾ
1.0 4.0 1.0 1.0 3.5

Note:Internet Explorer 6 (and earlier versions) does not support the attribute value "transparent".

Note:IE7 and earlier versions of browsers do not support the value "inherit". IE8 requires !DOCTYPE. IE9 supports "inherit".

" -->