HTML DOM height Property
Complete Style Object Reference
Definition and Usage
The height property sets the height of an element.
Syntax
Object.style.height=auto|length|%
|
Possible Values
| Value |
Description |
| auto |
The browser calculates the actual height |
| length |
Defines the height in px, cm, etc. |
| % |
Defines the height in % of the containing block |
Example
The following example sets the height of a button:
<html>
<head>
<script type="text/javascript">
function setHeight()
{
document.getElementById("b1").style.height="50px";
}
</script>
</head>
<body>
<input type="button" id="b1" onclick="setHeight()"
value="Change height of button to 50 px" />
</body>
</html>
|
Try-It-Yourself Demos
height - Set the height of an element
Complete Style Object Reference
Want To Be A Web Master?
If you want to be a Web Master, you will have to host your web site with an ISP (Internet Service Provider).
MaximumASP offers seven different configurations of dedicated servers to meet your Windows and .NET hosting needs.
Hosted on our multi-tiered Enterprise Class network, these servers provide the performance, security and reliability
you need to host your high end web sites and applications.
Visit MaximumASP
|