The padding-block-end property

The padding-block-end property specifies the end padding of an element along the block (vertical) axis.

Syntax

cssselector {
  padding-block-end: size;
}

Example

Let's set the block-axis ending padding of the child element to 20px:

html<div>
  <p>text</p>
</div>
cssdiv {
  width: 400px;
  height: 200px;
  border: 1px solid black;
}
p {
  padding-block-end: 20px;
  width: 100px;
  height: 50px;
  border: 1px solid red;
}

Результат:

Example

Now let's set the end padding of the child element on the block axis to 20%:

html<div>
  <p>text</p>
</div>
cssdiv {
  width: 400px;
  height: 200px;
  border: 1px solid black;
}
p {
  padding-block-end: 20%;
  width: 100px;
  height: 50px;
  border: 1px solid red;
}

Результат:

See also

  • the padding-block-start property
    that specifies the start padding of an element along the block axis
  • the padding-inline-end property
    that specifies the end padding of an element along the inline axis
  • the padding-inline-start property
    that specifies the start padding of an element along the inline axis
  • the padding property
    that sets a padding
  • the margin-bottom property
    that sets a bottom margin
  • the margin-left property
    that sets a left margin
  • the margin-right property
    that sets a right margin
  • the margin property
    that is a shorthand for a margin