Table of contents
New way of using Padding & Margin
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 to2.5rem
, whererem
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 to2.65rem
.