What is the CSS bottom property?

The bottom property in CSSCascade Style Sheets is used to define the bottom position of the elements placed vertically.

There will be no effect on the non-positioned elements.

Syntax


bottom: auto | length | percentage | initial | inherit;  

Property values

  • auto: This is the default value. The browser uses it to calculate the value of the bottom edge.

  • length: Sets the position of the bottom edge in px, cm, etc.

  • %: Sets the value in accordance with the percentage of the containing element.

  • initial: We use this to set the value to its default value.

  • inherit: This is used to inherit property from its parent value.

Code

Below is the basic HTMLHyperText Markup Language and CSS code to demonstrate the use of the bottom property.

Free Resources