Style Object borderTopStyle Property
Style Object
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
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 »
|
Style Object
Start Creating a stunning, Flash website. It's easy and free!
Wix is a revolutionary web design tool that provides you with a free, simple,
drag & drop editing platform to create your own professional and beautiful website.
Over 2 Million users have created their website with Wix.
Now create yours!
 |
W3Schools' Online Certification Program
The perfect solution for professionals who need to balance work, family, and career building.
More than 4500 certificates already issued!
|
The HTML Certificate documents your knowledge of HTML, XHTML, and CSS.
The JavaScript Certificate documents your knowledge of JavaScript and HTML DOM.
The XML Certificate documents your knowledge of XML, XML DOM and XSLT.
The ASP Certificate documents your knowledge of ASP, SQL, and ADO.
The PHP Certificate documents your knowledge of PHP and SQL (MySQL).
|