CSS bottom property

Description

CSS bottom property represents the distance of bottom side of current box either from the bottom side of parent box or from the original position depending upon the value of position property.


The current element should have position property otherwise bottom property will not work. We have positioned the current element with position: absolute; property.

Syntax

bottom : auto | length | percentage

Property values

autoDefault

It does not replace the current box.

bottom: auto;

length

It represents the distance of the bottom side of the current box from the bottom side of the parent box.

The box is 50px away from the bottom side of the parent box (absolute position).

bottom: 50px;

percentage

Actually percentage represents height of the parent box.

The box is 20% away from the bottom side of the parent box (absolute position).

bottom: 20%;

Applicable to

It applies to all elements

#CSS digger
Was this article helpful?

 
The current element should have position property otherwise bottom property will not work.
×

Ctrl+D