HTML DOM borderTopStyle Property
Complete Style Object Reference
Definition and Usage
The borderTopStyle property sets the style for the top border of an element.
Syntax
Object.style.borderTopStyle=style
|
Possible Values
Value |
Description |
none |
Defines no border |
hidden |
Same as "none", except in border conflict
resolution for table elements |
dotted |
Defines a dotted border |
dashed |
Defines a dashed border |
solid |
Defines a solid border |
double |
Defines two borders. The width of the two borders are
the same as the border-width value |
groove |
Defines a 3D grooved border. The effect depends on the
border-color value |
ridge |
Defines a 3D ridged border. The effect depends on the
border-color value |
inset |
Defines a 3D inset border. The effect depends on the
border-color value |
outset |
Defines a 3D outset border. The effect depends on the
border-color value |
Example
The following example changes the style of the top border of a paragraph:
<html>
<head>
<style type="text/css">
p
{
border: thick solid #FF0000
}
</style>
<script type="text/javascript">
function changeBorder()
{
document.getElementById("p1").style.borderTopStyle="dotted";
}
</script>
</head>
<body>
<input type="button" onclick="changeBorder()"
value="Change border style" />
<p id="p1">This is a paragraph</p>
</body>
</html>
|
Try-It-Yourself Demos
borderTopStyle - Change the style of the top border
Complete Style Object Reference
|
|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|