borderLeftStyle Property - Javascript CSS Style Property

Javascript examples for CSS Style Property:borderLeftStyle

Description

The borderLeftStyle property sets or gets the left border's style.

Property Values

Value Description
noneDefines no border. This is default
hidden Same as "none", except for table elements
dotted a dotted border
dashed a dashed border
solid a solid border
double double line borders.
groove a 3D grooved border.
ridge a 3D ridged border.
inset a 3D inset border.
outset a 3D outset border.
initial Sets this property to its default value.
inherit Inherits this property from its parent element.

Technical Details

Item Value
Default Value: none
Return Value: A String, representing the style of an element's left border
CSS VersionCSS1

Get left border of a <div> element:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<div id="myDiv" style="border-left:double;">This is a div.</div>
<br>
<button type="button" onclick="myFunction()">Return left border style</button>

<script>
function myFunction() {//w  w  w  .j a  v  a2s . c o  m
    console.log(document.getElementById("myDiv").style.borderLeftStyle);
}
</script>

</body>
</html>

Related Tutorials