/

HTML / CSS / JavaScript Tutorial

CSS Property: border-left-style

[this page | pdf | back links]

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

 

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

 

Default Value:

none

JavaScript syntax:

e.g. object.style.borderLeftStyle="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-left-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.borderLeftStyle = "dashed";
</script>

</body>
</html>

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


NAVIGATION LINKS
Contents | Prev | Next | CSS Properties


Desktop view | Switch to Mobile