CSS - Padding

Padding

In this tutorial, I will be showing you how you can adjust the space between the content of an element and the content's border using the padding properties in CSS.

definition
DEFINITION:

Padding is the space around the content of an element inside the content's border.

Padding Properties

PADDING TOP

The padding-top property is used to set the top padding of an element.

PADDING RIGHT

The padding-right property is used to set the right padding of an element.

PADDING BOTTOM

The padding-bottom property is used to set the bottom padding of an element.

PADDING LEFT

The padding-left property is used to set the left padding of an element.

note
NOTE:

Padding can have values in %, px, auto, inherit and other absolute and relative unit values.


Padding (Shorthand)

ADVERTISEMENTS

LEARNING IS A CONTINOUS PROCESS - PRACTICE MAKES PERFECT