Web4College

CSS bottom property

src

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;
Try it

length

50

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;
Try it

percentage

20

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%;
Try it

Applicable to

It applies to all elements