Padding & Margin

Padding & Margin

New way of using Padding & Margin

  1. The value specifies the padding for the inline (horizontal) and block (vertical) directions, respectively. Example:

     padding-inline: 2.5rem ;
     padding-block: 2.65 rem ;
    
    • padding-inline: This sets an element's horizontal padding (left and right). In this case, it's set to 2.5rem, where rem stands for "root em" and is a unit relative to the root element's font size.

    • padding block: This sets the vertical padding (top and bottom) for an element. It's set to 2.65rem.