CSS Padding Property

CSS 1

CSS 2

CSS 3

Yes Yes Yes

Description

Sets the padding properties. Used as a type of shortcut, instead of listing each property separately.

Syntax

padding: [value1],[value2] ...

Possible values

  • [padding-width]
  • inherit

Initial Value

Not Defined

Applies To

All elements

Inherited

No

Media

Visual

Example

.newDiv {padding: 5em 10em 3em 10em;}


View All CSS Properties