O'Reilly logo

CSS Pocket Reference, 4th Edition by Eric A. Meyer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

bottom

Values:

<length> | <percentage> | auto

Initial value:

auto

Applies to:

Positioned elements (that is, elements for which the value of position is something other than static)

Inherited:

No

Percentages:

Refer to the height of the containing block

Computed value:

For relatively positioned elements, see description; for static elements, auto; for length values, the corresponding absolute length; for percentage values, the declared value; otherwise, auto

Description:

Defines the offset between the bottom outer margin edge of a positioned element and the bottom edge of its containing block. For relatively positioned elements, if both bottom and top are auto, their computed values are both 0; if one of them is auto, it becomes the negative of the other; if neither is auto, bottom will become the negative of the value of top.

Examples:

div#footer {position: fixed; bottom: 0;}
sup {position: relative; bottom: 0.5em; 
     vertical-align: baseline;}

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required