HTML DOM borderStyle Property
Complete Style Object Reference
Definition and Usage
The borderStyle property sets or returns the border style for all four sides in
one.
This property can take one to four styles.
Syntax
Object.style.borderStyle=style
|
Possible Values
Value |
Description |
none |
Defines no border |
hidden |
The 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 border:
<html>
<head>
<style>
p
{
border: thick solid #FF0000
}
</style>
<script type="text/javascript">
function changeBorder()
{
document.getElementById("p1").style.borderStyle="dotted double";
}
</script>
</head>
<body>
<form>
<input type="button" onclick="changeBorder()"
value="Change paragraph border style" />
</form>
<p id="p1">This is a paragraph</p>
</body>
</html>
|
Try-It-Yourself Demos
Change the style of a border
Complete Style Object Reference
Learn XML with <oXygen/> XML Editor - Free Trial!
|
|
oXygen helps you learn to define,
edit, validate and transform XML documents. Supported technologies include XML Schema,
DTD, Relax NG, XSLT, XPath, XQuery, CSS.
Understand in no time how XSLT and XQuery work by using the intuitive oXygen debugger!
Do you have any XML related questions? Get free answers from the oXygen
XML forum
and from the video
demonstrations.
Download a FREE 30-day trial today!
|
|