Loading Please Wait...

Logo Lynxsia IT Solutions

CSS Border Width

CSS Border Width

CSS border-width property is used to set border width of the element.

Border Width Values

The border-width property can have following values:

Keyword values: thin, medium, and thick.

Length values: px, em, rem, in, cm, etc.

Global values: inherit, initial, revert, revert-layer, and unset.

Syntax
One Value

Sets border width for all sides

border-width: thin;

Two Value

First value sets width of top-bottom and second value sets width of left-right

border-width: thin medium;

Three Value

First value sets width of top, second value sets width of left-right and third value sets width of bottom

border-width: thin medium thick;

Four Value

First value sets width of top, second value sets width of right, third value sets width of bottom, and forth value sets width of left.

border-width: thin medium thick 10px;

					 
        
          /* Keyword values */
          border-width: thin;
          border-width: medium;
          border-width: thick;

          /* all sides*/
          border-width: 4px;
          border-width: 1.2rem;

          /* top and bottom | left and right */
          border-width: 2px 1.5em;

          /* top | left and right | bottom */
          border-width: 1px 2em 1.5cm;

          /* top | right | bottom | left */
          border-width: 1px 2em 0 4rem;

          /* Global values */
          border-width: inherit;
          border-width: initial;
          border-width: revert;
          border-width: revert-layer;
          border-width: unset;
        
      
Individual Sides

CSS provide border-top-width, border-right-width, border-bottom-width, border-left-width property to set border width of individual sides.

					 
        
          /* top border */
          border-top-width: 4px;

          /* right border */
          border-right-width: 4px;

          /* bottom border */
          border-bottom-width: 4px;

          /* left border */
          border-left-width: 4px;
        
      

How you feel about this blog:

Share this blog on:

Report Us

If you find any error in the turtorials, or want to share your suggestion/feedback, feel free to send us email at: info@lynxsia.com

Contact Us
Ads
Logo
Lynxsia IT Solutions

We are concern with various development process like website design & development, E-commerce development, Software development, Application development, SMS & Bulk SMS Provider, PWA Development, and many more..

Kotwali Road, Chhiptehri, Banda, 210001, UP, India

Copyright © 2022, Lynxsia IT Solutions, All rights reserved