CSS

CSS paddings applying in clockwise order.
18.01.2022
img

Padding is used to create space around an element's content, inside of any defined borders.
The CSS padding properties are used to generate space around an element's content, inside of any defined borders.
With CSS, you have full control over the padding. There are properties for setting the padding for each side of an element (top, right, bottom, and left).The padding property may be specified using one, two, three, or four values. Each value is a length or a percentage. Negative values are invalid.

  1. When one value is specified, it applies the same padding to all four sides.
  2. When two values are specified, the first padding applies to the top and bottom, the second to the left and right.
  3. When three values are specified, the first padding applies to the top, the second to the right and left, the third to the bottom.
  4. When four values are specified, the paddings apply to the top, right, bottom, and left in that order (clockwise).

back to all posts