CSS border-top-width Property
Complete CSS Reference
Definition
The border-top-width property sets the width of an element's top border.
Inherited: No
Note: Always declare the border-style property before the border-width
property. An element must have borders before you change the width of them.
JavaScript Syntax
CSS properties can also be dynamically changed with a JavaScript.
Scripting Syntax: object.style.borderTopWidth="thick"
In our HTML DOM tutorial you can find more details about the
borderTopWidth property.
In our HTML DOM tutorial you can also find a full
Style Object Reference.
Example
|
table
{
border-style: solid;
border-top-width: thin
}
table
{
border-style: solid;
border-top-width: 0.5cm
}
|
Possible Values
| Value |
Description |
| thin |
Defines a thin top border. |
| medium |
Default. Defines a medium top border. |
| thick |
Defines a thick top border. |
| length |
Allows you to define the thickness of the top
border. |
Try-It-Yourself Demos
Set the width of the top
border
This example demonstrates how to set the width of the top border.
Complete CSS Reference
NEW! Altova MissionKit 2007– Save ½ off Intelligent tools for XML developers & software architects
 | |
The Altova MissionKit 2007
bundles Altova’s application development, data management and
modeling tools at 50% off their regular prices. It is available in a
variety of configurations tailored to meet the needs of software
architects and XML developers. All MissionKits include the
world’s leading XML development tools: Altova
XMLSpy,
MapForce,
and StyleVision.
Gear
up; download a FREE 30-day trial today!
|
|