CSS Property border-right-width








border-right-width sets the width for the right border.

Summary

ItemValue
Initial value medium
Inherited No.
Version CSS1
JavaScript syntax object.style.borderRightWidth="thick"
Applies to All elements.

CSS Syntax

border-right-width: non-negative length | 
                    medium | 
                    thick | 
                    thin | 
                    inherit 




Property Values

The property values are listed in the following table.

Value Description
thin thin border
medium medium border. default
thick thick border
length set the thickness
inherit inherit the border width from the parent element

Browser compatibility

border-right-width Yes Yes Yes Yes Yes




Example

An example showing how to use border-right-width CSS property.

<!DOCTYPE HTML>
<html>
    <head>
        <style>
        h2 {<!--from w  w w  .j  a v  a 2s .  com-->
         border-right-width: 2px;
         border-right-style: double;
        }
        </style>
    </head>
<body>
  <h2>This is the title</h2>
</body>
</html>

Click to view the demo