border-right

Description

border-right shorthand property defines the width, color, and style of the right border.

ItemValue
Initial value All elements.
Inherited No.
Version CSS1
JavaScript syntax object.style.borderRight="5px solid red"
Applies to

Syntax and Property Values


border-right: border-width border-style border-color; 

The property values are listed in the following table.

Value Description
border-right-width Set the width of the right border
border-right-style Set the style of the right border
border-right-color Set the color of the right border
inherit Inherit the border-right property from the parent element

Example


<!DOCTYPE HTML>
<html>
    <head>
    <style>
    div {<!--from   w  w  w.jav  a  2 s .  co m-->
        border-right: 2px dashed darkkhaki;
        background: lightyellow;
    }
    </style>
    </head>
    <body>
        <div>java2s.com</div>
    </body>
</html>

Click to view the demo

The code above generates the following result.

border-right




















Home »
  HTML CSS »
    HTML CSS Reference »




HTML Tag Reference
CSS Reference
CSS Selector Reference
Encoding Reference