CSS border-left-width property

CSS border-left-width property

Description

Sets the width of an element’s left border.

Possible values

  • Length unit – Any length unit. Length units for this property cannot have negative values.
  • thin – A border thinner than medium.


  • medium – Thicker than thin, thinner than thick.

  • thick – Thicker than medium.

Applies to

All HTML elements.

DOM Syntax

object.style.borderLeftWidth = "2px"; 

Example

Here is an example showing all border widths:

<html> 
<head> 
</head> 

<body> 
<p style = "border-width:4px; border-style:solid;"> 
This is a solid border whose width is 4px. 
</p> 

<p style = "border-width:4pt; border-style:solid;"> 
This is a solid border whose width is 4pt. 
</p> 

<p style = "border-width:thin; border-style:solid;"> 
This is a solid border whose width is thin. 
</p> 

<p style = "border-width:medium; border-style:solid;"> 
This is a solid border whose width is medium; 
</p> 

<p style = "border-width:thick; border-style:solid;"> 
This is a solid border whose width is thick. 
</p> 

<p style = "border-bottom-width:4px; 
border-top-width:10px; 
border-left-width: 2px; border-right-width: 15px; 
border-style:solid;"> 
This is a border with four different widths.
</p> 
</body> 
</html> 

This will produce the following −

CSS border-left-width property

Leave a Reply

Your email address will not be published. Required fields are marked *