Padding Property

The padding defines the space between the element border and the element content. That is the area around the content of an element and inside the border. The padding is affected by the background color of the element. The top, right, bottom, and left padding can be changed independently using separate properties. A shorthand padding property can also be used, to change all paddings at once. The possible values for the padding property are:

Value Description
length Defines a fixed padding (in pixels, pt, em, etc.)
% Defines a padding in % of the containing element

Back button Table of Contents Next button