Padding on a given side

suggest change

The padding property sets the padding space on all sides of an element. The padding area is the space between the content of the element and its border. Negative values are not allowed.

You can specify a side individually:

The following code would add a padding of 5px to the top of the div:

.myClass {
    padding-top: 5px;

<div class="myClass"></div>

Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents