FANDOM


The bottom property is used in CSS and certain HTML elements. It specifies part of the position of positioned elements. For absolutely positioned elements (those with position:absolute; or position:fixed;), it specifies the distance between the bottom margin edge of the element and the bottom edge of its containing block. For relatively positioned elements (those with position:relative;), it specifies the amount the element is moved above its normal position. However, the top property overrides the bottom property, so if top is not auto, the computed value of bottom is the negative of the computed value of top.

Values

  • <length> - A length which can be negative, zero, or positive. Ex. px, em, etc.
  • <percentage> - A percentage of the containing block's height.
  • auto - For absolutely positioned elements, it positions the element based on the top property and treats height:auto; as a height based on the content. For relatively positioned elements, the offset of the element from its original position is based on the top property, or if top is also auto, it does not offset it at all.
  • inherit - Inherits the computed value from its parent element (which may not be its containing block). This computed value is then handled like it was a <length>, a <percentage>, or auto.


HTML example:

<div style="position:fixed; bottom:10px;">
TEXT
</div>


CSS example:

div {
     position:fixed;
     bottom:10px;
}

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.