Easy Tutorial
❮ Jsref Max Value Met Video Play ❯

bottom Property


Definition and Usage

The bottom property sets or returns the bottom position of a positioned element.

This property specifies the bottom position of the element, including padding, scrollbars, borders, and margins.

Tip: A positioned element is an element whose position property is set to: relative, absolute, or fixed.

Syntax

Setting the bottom property:

Returning the bottom property:

Value Description
auto Default. The bottom position is calculated by the browser.
length Sets the position of the element's bottom edge relative to the bottom edge of the nearest positioned parent element using units like px, cm, etc. Negative values are allowed.
% Sets the position of the element's bottom edge as a percentage relative to the bottom edge of the nearest positioned parent element.
inherit The bottom property value is inherited from the parent element.

Browser Support

All major browsers support the bottom property.

Note: IE7 and earlier versions do not support the "inherit" value. IE8 supports "inherit" only if an !DOCTYPE is specified. IE9 supports "inherit".


Example

Setting the bottom position of a button:

❮ Jsref Max Value Met Video Play ❯