<?xml version="1.0" encoding="utf-8"?>

The padding property

The padding property

CSS offers different ways to set padding size. If you are using the padding shorthand property with one value, it will set the same padding size for all 4 sides. For example, "padding: 25px;" will make padding on all sides 25 pixels.

However, there are ways to set different padding values for every side. You can write 4 values for the padding property that will respectively define the top, right, bottom, and left padding. For example, "padding: 25px 50px 75px 100px;". However, this method can get really confusing, so another option is to use individual padding properties "padding-top:25px;", "padding-right:50px;", "padding-bottom:75px;", and "padding-left:100px;".

Improve your UX & Product skills with interactive courses that actually work