border-left-width property
Specifies the thickness of the left border of the object.
![]() |
Syntax
border-left-width: thin | thick | medium |
<width>
Property values
medium-
Initial value. The default thickness.
thin-
Less than the default thickness.
thick-
Greater than the default thickness.
- width
-
Thickness specified by a floating-point number, followed by a supported length unit.
CSS information
| Applies To | All elements |
|---|---|
| Media | visual |
| Inherited | no |
| Initial Value | medium |
Standards information
- CSS Backgrounds and Borders Module Level 3, Section 4.3
Examples
The following examples use the border-left-width CSS property and the borderLeftWidth scripting property to specify the border width.
This example uses a call to an embedded (global) style sheet to change the width of the left border width to 1 centimeter when a mouse click occurs.
Code example: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/border-left-width.htm
<head> <style> td { border-left-width: 3mm; border-style:solid; border-color:gray; text-align:center; } .changeborder1 { border-left-width: 1cm; } </style> </head> <body> <table> <tr> <td onclick="this.className='changeborder1'" ondblclick="this.className=''"> <img src="sphere.jpg"> </td> </tr> </table>
This example uses inline scripting to change the width of the left border width to 1 centimeter when a mouse click occurs.
Code example: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/borderLeftWidth.htm
<td onclick="this.style.borderLeftWidth='1cm'">
See also
- CSSStyleDeclaration
- currentStyle
- defaults
- runtimeStyle
- style
- Reference
- border
- border-width
- Other Resources
- CSS Enhancements in Internet Explorer 6
