CSS shorthand for Padding
By [)ia6l0 iii
Padding properties are specified using the Padding-Top, Padding-Bottom , Padding-Left and Padding-Right. CSS allows you to use a shorthand technique to specify these.
Instead of using multiple padding properties or attributes, you can use a single shorthand notation.
Look
below for a sample.
Instead of ,
padding-top: 5px;
padding-right: 10px;
padding-bottom: 15px;
padding-left: 20px;
Use,
padding: 5px 10px 15px 20px
The order of appearance is Top, Right, Left, and
Bottom.
Related FAQs
Margins are specified using the margin-top, margin-bottom, margin-left and margin-bottom properties. CSS allows you to specify these properties through a shorthand notation too.
In CSS , we specify the color using the hexadecimal notation: # followed by the six digits.
CSS shorthand for Padding (821 Views)