Sets or retrieves the bottom position of the object in relation to the bottom of the next positioned object in the document hierarchy.
Syntax
HTML
{ bottom : sBottom }
Scripting
object.style.bottom [ =sBottom ]
Possible Values
sBottom
Variant that
specifies or receives one of the following values.
auto
Default. Default position, according to the regular HTML layout of the page.
length
Floating-point number, followed by an absolute units designator (cm, mm, in, pt, pc, or px) or a relative units designator (em or ex). For more information about the supported length units, see>CSS Length Units Reference.
percentage
Integer, followed by a percent sign (%). The value is a percentage of the height of the parent object.
The property is read/write
for all objects except the following, for which it is read-only:
currentStyle.
The property has a default value of
auto. The Cascading Style Sheets (CSS) attribute is
not inherited.
Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see About Dynamic Properties.
Remarks
The bottom attribute should be used only when the position
attribute is set; otherwise, the value of the bottom attribute is ignored.
Because the value of the bottom property is a string, the property cannot be used in script to calculate the position of the object in the document; instead, the>pixelBottom property or the>posBottom property should be used.
For more information about how to access the dimension and location of objects on the page through the Dynamic HTML (DHTML) object model, see>Measuring Element Dimension and Location.
Example
This example uses the bottom attribute to set a div object 50 pixels from the bottom of the client area.