Gets or sets the bottom position of the object in relation to the bottom of the next positioned object in the document hierarchy.
Syntax
CSS { bottom : sBottom } Scripting [ sBottom = ] object.style.bottom
Possible Values
sBottom String 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, orpc) or a relative units designator (em,ex, orpx). 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.
DHTML expressions can be used in place of the preceding value(s). As of Internet Explorer 8, expressions are supported in IE7 Standards mode and IE5 (Quirks) mode only. For more information, see About Dynamic Properties and Defining Document Compatibility.
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 with CSSOM in Internet Explorer 9.
Example
This example uses the bottom attribute to set a div object 50 pixels from the bottom of the client area.
<DIV STYLE = "position:absolute; bottom:50px"> . . . </DIV>
Standards Information
This property is defined in Cascading Style Sheets (CSS), Level 2 (CSS2).
Applies To
A, ADDRESS, APPLET, ARTICLE, ASIDE, B, BIG, BLOCKQUOTE, BUTTON, CENTER, CITE, CODE, CSSStyleDeclaration, currentStyle, CUSTOM, DD, defaults, DFN, DIR, DIV, DL, FIELDSET, FIGCAPTION, FIGURE, FONT, FOOTER, FORM, HEADER, HGROUP, hn, HR, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING, MARK, MARQUEE, MENU, NAV, OBJECT, OL, P, PRE, runtimeStyle, S, SAMP, SECTION, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TEXTAREA, TT, U, UL, VAR, XMP, CSSCurrentStyleDeclaration Constructor, CSSRuleStyleDeclaration Constructor, CSSStyleDeclaration Constructor
See Also