Style borderRightStyle property

Definition and Usage

borderRightStyle Sets or returns the style of the element's right border.

See also:

CSS Tutorial:CSS Borders

CSS Reference Manual:border-right-style property

HTML DOM Reference Manual:border property

Instance

Example 1

Add a solid right border to the <div> element:

document.getElementById("myDiv").style.borderRightStyle = "solid";

Try it yourself

Example 2

Changes the right border style of the <div> element to "dotted":

document.getElementById("myDiv").style.borderRightStyle = "dotted";

Try it yourself

Example 3

Returns the right border style of the <div> element:

alert(document.getElementById("myDiv").style.borderRightStyle);

Try it yourself

Example 4

Demonstration of all different values:

var listValue = selectTag.options[selectTag.selectedIndex].text;
document.getElementById("myDiv").style.borderRightStyle = listValue;

Try it yourself

Syntax

Returns the borderRightStyle property:

object.style.borderRightStyle

Sets the borderRightStyle property:

object.style.borderRightStyle = value
Value Description
none Defines a border without any style. Default.
hidden Same as "none", except in resolving border conflicts for table elements.
dotted Defines a dotted border.
dashed Defines a dashed border.
solid Defines a solid border.
double Defines two borders. The width of both borders is the same as the value of border-width.
groove Defines a 3D grooved border. The effect depends on border-color values.
ridge Defines a 3D ridged border. The effect depends on border-color values.
inset Defines a 3D inset border. The effect depends on border-color values.
outset Defines a 3D outset border. The effect depends on border-color values.
initial Sets this property to its default value. See initial.
inherit Inherits this property from its parent element. See inherit.

Technical Details

Default Value: None
Return Value: A string representing the style of the element's right border.
CSS Version: CSS1

Browser Support

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Support Support Support Support Support