border-left
shorthand property
defines the width, color, and style of the left border.
Item | Value |
---|---|
Initial value | not specified |
Inherited | No. |
Version | CSS1 |
JavaScript syntax | object.style.borderLeft="5px solid red" |
Applies to | All elements. |
border-left: border-width border-style border-color;
The property values are listed in the following table.
Value | Description |
---|---|
border-left-width | Set the width of the left border |
border-left-style | Set the style of the left border |
border-left-color | Set the color of the left border |
inherit | Inherit the border-left property from the parent element |
border-left |
Yes | Yes | Yes | Yes | Yes |
An example showing how to use border-left CSS property.
<!DOCTYPE HTML>
<html>
<head>
<style>
div {<!--from w w w. ja v a 2s . c o m-->
border-left: 1px dashed darkkhaki;
background: lightyellow;
}
</style>
</head>
<body>
<div>java2s.com</div>
</body>
</html>