CSS CSS Tutorial CSS Advanced CSS Responsive Web Design(RWD) CSS Grid CSS Properties Sass Tutorial Sass Functions



padding-block-end

Padding-Block-End is a CSS property that is used to add padding to the bottom of an element. It is also known as padding-bottom or padding-after. This property is used to create space between the content and the border of an element. Padding-Block-End is a part of the CSS Box Model, which is used to define the layout of an element.

The padding-block-end property is used to add padding to the bottom of an element. The value of this property can be specified in pixels, ems, rems, or percentages. The default value of this property is 0, which means that no padding is added to the bottom of the element.

Here is an example of how to use the padding-block-end property:

  
    .example {
      padding-block-end: 20px;
    }
  

In the above example, the padding-block-end property is used to add 20 pixels of padding to the bottom of the element with the class "example".

The padding-block-end property can also be used with the shorthand padding property. Here is an example:

  
    .example {
      padding: 10px 20px 30px 40px;
      padding-block-end: 50px;
    }
  

In the above example, the padding property is used to add 10 pixels of padding to the top, 20 pixels of padding to the right, 30 pixels of padding to the bottom, and 40 pixels of padding to the left of the element with the class "example". The padding-block-end property is then used to add an additional 50 pixels of padding to the bottom of the element.

It is important to note that the padding-block-end property only affects the bottom padding of an element. If you want to add padding to all sides of an element, you should use the padding property instead.

Here is an example of how to use the padding property:

  
    .example {
      padding: 10px 20px 30px 40px;
    }
  

In the above example, the padding property is used to add 10 pixels of padding to the top, 20 pixels of padding to the right, 30 pixels of padding to the bottom, and 40 pixels of padding to the left of the element with the class "example".

Overall, the padding-block-end property is a useful CSS property that can be used to add padding to the bottom of an element. It is a part of the CSS Box Model, which is used to define the layout of an element. The padding-block-end property can be used with the shorthand padding property to add padding to all sides of an element.

Examples

Here are some examples of how to use the padding-block-end property:

  
    /* Example 1 */
    .example1 {
      padding-block-end: 20px;
    }

    /* Example 2 */
    .example2 {
      padding: 10px 20px 30px 40px;
      padding-block-end: 50px;
    }

    /* Example 3 */
    .example3 {
      padding: 10px 20px 30px 40px;
    }
  

References

Activity