HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
Change the width of the right border of a <div> element to 10px
The borderRightWidth property sets or returns the width of the right border of an element.
Property | |||||
---|---|---|---|---|---|
borderRightWidth | Yes | Yes | Yes | Yes | Yes |
Return the borderRightWidth property:
Set the borderRightWidth property:
Value | Description |
---|---|
thin | Defines a thin border |
medium | Defines a medium border. This is default |
thick | Defines a thick border |
length | The width of the border in length units |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Default Value: | medium |
---|---|
Return Value: | A String, representing the width of an element's right border |
CSS Version | CSS1 |
Change the width of the right border of a <div> element to thin:
document.getElementById("myDiv").style.borderRightWidth = "thin";
Return the width of the right border of a <div> element:
alert(document.getElementById("myDiv").style.borderRightWidth);
CSS tutorial: CSS Border
CSS reference: border-right-width property
HTML DOM reference: border property