HTML DOM bottom Property
Complete Style Object Reference
Definition and Usage
The bottom property sets how far the bottom edge of an element is above/below
the bottom edge of the parent element.
Syntax
Object.style.bottom=auto|%|length
|
Possible Values
Value |
Description |
auto |
Lets the browser calculate the bottom position |
% |
Sets the bottom position in % from the bottom edge of
the parent element |
length |
Sets the bottom position in px, cm, etc. from the
bottom edge of the parent element. Negative values are allowed |
Tips and Notes
Note: If the "position" property has a value of "static", the "bottom"
property has no effect.
Example
The following example sets the bottom edge of a button:
<html>
<head>
<style type="text/css">
input
{
position:absolute;
}
</style>
<script type="text/javascript">
function setBottomEdge()
{
document.getElementById("b1").style.bottom="100px";
}
</script>
</head>
<body>
<input type="button" id="b1" onclick="setBottomEdge()"
value="Set bottom edge to 100 px" />
</body>
</html>
|
Try-It-Yourself Demos
bottom - Set the bottom edge of an element
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!
|
|