/

HTML / CSS / JavaScript Tutorial

CSS Property: border-right-style

[this page | pdf | back links]

The CSS (CSS1) border-right-style property sets the border style of the right border of an element.

 

Valid property values (other than inherit and initial) are shown here.

 

Default Value:

none

JavaScript syntax:

e.g. object.style.borderRightStyle="groove"

Inherited:

No

Animatable:

No

 

EXAMPLE:


HTML USED IN THIS EXAMPLE:
<!DOCTYPE html>
<html> <!-- Copyright (c) Nematrian Limited 2018 -->
<head>
<style>
p {border: thin solid black; width: 200px}
p.x1 {border-right-style: dashed;}
</style>
</head>
<body>
<p>1. Element with default property</p>
<p class="x1">2. Element set using in-file HTML style</p>
<p id="x2">3. Element set using JavaScript</p>

<script>
document.getElementById("x2").style.borderRightStyle = "dashed";
</script>

</body>
</html>

FUNCTION THAT MAY ASSIST IN TESTING WHETHER FEATURE IS SUPPORTED:
function isSupportedCSSPropertyBorderRightStyle() {
  var x = document.createElement("DIV"); x.style.borderRightStyle = "dashed"; return (window.getComputedStyle(x, null).borderRightStyle == "dashed");
}


NAVIGATION LINKS
Contents | Prev | Next | CSS Properties


Desktop view | Switch to Mobile