CSS position bottom property
CSS Position bottom Property
Description
The bottom property defines the offset of the bottom edge of an absolutely positioned element relative to the bottom edge of its positioning context, or the vertical distance a relatively positioned element is displaced.
Possible Values
- length − A fixed distance from the bottom edge of the positioning context.
-
percent − A percentage relative to the height of the positioning context, assuming the context’s height is explicitly set. If not set, the percentage value for bottom is treated as auto.
-
auto − Default value. Let the browser calculate the bottom position.
Applies to
All HTML positioned elements.
DOM Syntax
object.style.bottom = "2px";
Example
Here’s an example showing the effect of this property –
<html>
<head>
</head>
<body>
<p style = "position:absolute; bottom:100px;">
This line will be positioned 100px above the bottom edge of this window.
</p>
</body>
</html>
It will produce the following result −