CSS padding-top Property


Padding is the space between the content and the border of a page. The padding-top CSS property specifies the width of the padding area at the top of an element.

Syntax

Example

Preview

Property Values

Value Description
length Specifies a fixed top padding in pixels, points, centimeters, and so on. The default value is zero. Learn more about length units.
% Top padding is specified as a percentage of the width of the containing element.
initial This property is set to its default value.
inherit This property is inherited from its parent element.

Supported Browsers

Property Chrome Firefox Safari Edge / IE Opera
padding-top 1.0 1.0 1.0 4.0 3.5