Web4College

CSS padding-top property

src

Description

CSS padding-top property represents space between the top sides of content and the border areas. It increases the height of a box more than usual.


Negative values are not allowed.

Syntax

padding-top :+ve length

Property values

length Default

0

There is no space between the top side border and content area.

padding-top: 0;
Try it

+ve length

30

There is 30px space between top side border and content area. The height of box increases by 30px due to padding-top.

padding-top: 30px;
Try it

Applicable to

It applies to all elements other than internal table elements.