Skip to main content

Command Palette

Search for a command to run...

Padding & Margin

Published
1 min read
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.

More from this blog

Web Development

103 posts