0 out of 2 rated this helpful - Rate this topic

bottom property

[This documentation is preliminary and is subject to change.]

Sets or retrieves the bottom position of the object in relation to the bottom of the next positioned object in the document hierarchy.

CSS 2.1, Section 9.3.2

Syntax

bottom: length | percentage | auto

Property 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, or pc) or a relative units designator (em, ex, or px). For more information about the supported length units, see CSS Values and Units Reference.

percentage

Integer, followed by a percent sign (%). The value is a percentage of the height of the parent object.

CSS information

Applies ToAll elements
Mediavisual
Inheritedno
Initial Value

Standards information

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.

Examples

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>

See also

CSSStyleDeclaration
currentStyle
defaults
runtimeStyle
style
Reference
pixelTop
posTop

 

 

Build date: 3/14/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Careful with support
Under IE 4,5 and 6, in the case you specify the 'top' property, 'bottom' is ignored. You can either get creative with margins, floats and such (which is awkward and not flexible at all), or use CSS expressions (which isn't standard yet, and doesn't work when Jscript is disabled).