Style borderRightWidth attribute

Definition and Usage

borderRightWidth Sets or returns the width of the element's right border.

See also:

CSS Tutorial:Bajak CSS

CSS Reference Manual:border-right-width attribute

HTML DOM Reference Manual:border attribute

Example

Example 1

Changes the width of the right border of the <div> element to 10px:

document.getElementById("myDiv").style.borderRightWidth = "10px";

Try It Yourself

Example 2

Changes the width of the right border of the <div> element to thin:

document.getElementById("myDiv").style.borderRightWidth = "thin";

Try It Yourself

Example 3

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

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

Try It Yourself

Syntax

Returns borderRightWidth attribute:

object.style.borderRightWidth

Sets borderRightWidth attribute:

object.style.borderRightWidth = "thin|medium|thick|length|initial|inherit"

Attribute Value

Value Description
thin Defines thin border.
medium Defines medium border. Default.
thick Defines thick border.
length Border width in length units.
initial Sets this property to its default value. See initial.
inherit Inherits this property from its parent element. See inherit.

Technical Details

Default value: medium
Return value: A string that represents the width of the element's right border.
CSS Version: CSS1

Browser Support

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Dukungan Dukungan Dukungan Dukungan Dukungan