CSS border right is used to set the right border of an HTML element.
This is a shorthand property with a single setting to specify the width, style and color of the right border.
Syntax
1 |
border-right: border-width border-style border-color; |
1 2 3 4 5 6 7 8 |
<style> .div-border{ border-right:2px solid #000; } </style> <div class="div-border"> <p>This is a paragraph to show right border property of an HTML element.</p> </div> |
Output
This is a paragraph to show right border property of an HTML element.
CSS border right values list
Sr. No. | value | Description |
---|---|---|
1 | border-width | Used to give the width of the border. The value of this is in px. Check the CSS border width for more detail. |
2 | border-style | Used to give style for the border. The value of this can be from none, hidden, dotted, dashed, solid, double, groove, ridge, inset, outset. Check CSS border style for more detail. |
3 | border-color | Used to give color for the border. The value of this can be hex color, rbga() and color label. Check CSS border color for more detail. |
4 | initial | Used to define as the property initial value. |
5 | inherit | Used to define the computed value of the property on the elements parent. |