CSS Property: border-bottom-width
[this page | pdf | back links]
The CSS (CSS1) border-bottom-width property sets the width
of the bottom border of an element. You should always specify the border-style
property before this property, as an element must have a border before you can
change its characteristics.
Valid property values
(other than inherit
and initial) are:
Value
|
Description
|
length
|
Any specified thickness
as a CSS length
|
medium
|
(default value). Medium
width
|
thick
|
Thick width
|
thin
|
Thin width
|
Default Value:
|
medium
|
JavaScript syntax:
|
e.g. object.style.borderBottomWidth="4px"
|
Inherited:
|
No
|
Animatable:
|
Yes
|
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-bottom-width: thick;}
</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.borderBottomWidth = "thick";
</script>
</body>
</html>
|
FUNCTION THAT MAY ASSIST IN TESTING WHETHER FEATURE IS SUPPORTED:
function isSupportedCSSPropertyBorderBottomWidth() {
var x = document.createElement("DIV"); x.style.borderBottomWidth = "thick"; return (window.getComputedStyle(x, null).borderBottomWidth == "thick");
} |
NAVIGATION LINKS
Contents | Prev | Next | CSS Properties