CSS | border-bottom-width Property

The border-bottom-width property in CSS is used to set a specific width to the bottom border of an element. The border-bottom-style or border-style property is used for the element before using the border-bottom-width property.

Syntax:

border-bottom-width: length|thin|medium|thick|initial|inherit;

Property Values: The border-bottom-width property values are listed below:

  • thin: It is used to set the thin border of the bottom.
  • medium: It is used to set medium sized bottom border. It is the default value.
  • thick: It is used to set thick bottom border.
  • length: It is used to set the width of the border. It does not takes negative value.

Example:

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
    <head>
        <title>
            border-bottom-width property
        </title>
          
        <style>
            #thin {
                border-color: green;
                border-bottom-style: solid;
                border-bottom-width: thin;
            }
            #medium {
                border-color: green;
                border-bottom-style: solid;
                border-bottom-width: medium;
            }
            #thick {
                border-color: green;
                border-bottom-style: solid;
                border-bottom-width:thick;
            }
            #length {
                border-color: green;
                border-bottom-style: solid;
                border-bottom-width: 20px;
            }
        </style>
    </head>
      
    <body style = "text-align:center">
      
        <h1 style = "color:green">GeeksforGeeks</h1>
      
        <h3>border-bottom-width property</h3>
          
        <div id="thin">
            border-bottom-width: thin;
        </div><br><br>
          
        <div id="medium">
            border-bottom-width: medium;
        </div><br><br>
          
        <div id="thick">
            border-bottom-width: thick;
        </div><br><br>
          
        <div id="length">
            border-bottom-width: length;
        </div>
    </body>
</html>                                

chevron_right


Output:

Browser support: The browser supported by border-bottom-width property are listed below:

  • Google Chrome 1.0
  • Internet Explorer 4.0
  • Firefox 1.0
  • Safari 1.0
  • Opera 3.5


My Personal Notes arrow_drop_up


If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.