Set the width of the bottom border of a <div> element to thin: - Javascript CSS Style Property

Javascript examples for CSS Style Property:borderBottomWidth

Description

Set the width of the bottom border of a <div> element to thin:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<head>
<style>
#myDiv {//w w  w . ja  v a  2s.co m
    border-style: 10px solid red;
}
</style>
</head>
<body>

<div id="myDiv">This is a div element.</div>
<br>
<button type="button" onclick="myFunction()">Change width of the bottom border</button>

<script>
function myFunction() {
    document.getElementById("myDiv").style.borderBottomWidth = "thin";
}
</script>

</body>
</html>

Related Tutorials