Easy Tutorial
❮ Prop Img Name Met Element Removeeventlistener ❯

Style borderRight Property


Definition and Usage

The borderRight property sets or returns the three individual right border properties in a shorthand form.

With this property, you can set/return:

Syntax

Set the borderRight property:

Return the borderRight property:

Note: The borderRight property has no default value.

Parameter Description
width Sets the width of the right border.
style Sets the style of the right border.
color Sets the color of the right border.

Browser Support

All major browsers support the borderRight property.


Example

Change the width, style, and color of the right border:

<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title>tutorialpro.org(tutorialpro.org)</title> 
<style type="text/css">
#ex1{
    border: thin dotted #FF0000;
}
</style>
<script>
function displayResult(){
    document.getElementById("ex1").style.borderRight="thick solid #0000FF";
}
</script>
</head>
<body>

<div id="ex1">This is some text.</div>
<br>
<button type="button" onclick="displayResult()">Modify Right Border</button>

</body>
</html>

❮ Prop Img Name Met Element Removeeventlistener ❯