CSS - border-left-width



Sets the width of the left border of an element.

Possible Values

  • length − Any length unit. Length units for this property may not be negative.

  • thin − A border which is thinner than a border set to medium.

  • medium − A border which is thicker than a border set to thin, and thinner than a border set to thick.

  • thick − A border which is thicker than a border set to medium.

Applies to

All the HTML elements.

DOM Syntax

object.style.borderLeftWidth = "2px";

Example

Following example demonstrates border-left-width property −

<html>
<head>
   <style>
      h2{
           border-style: dotted;
           border-left-width: 5px;
       }
       p {border-style: solid;
          border-left-width: thin;
          }

   </style>
</head>
<body>
      <h2>border-left-width (single-side)</h2>
      <p>Different border widths on all sides. Check the width at the left of the element.</p>
</body>
</html>
Advertisements