0
What happens if I just write padding : 60px ; ?
If I don't enter four values for padding to specify each side and just add one value like 60 px what will happen? Will that value be considered for all sides or just the top side as it's supposed to be?
4 Réponses
+ 2
Hi,
If the padding property has one value:
padding: 25px;
all four paddings are 25px
If the padding property has two values:
padding: 25px 50px;
top and bottom paddings are 25px
right and left paddings are 50px
If the padding property has three values:
padding: 25px 50px 75px;
top padding is 25px
right and left paddings are 50px
bottom padding is 75px
If the padding property has four values:
padding: 25px 50px 75px 100px;
top padding is 25px
right padding is 50px
bottom padding is 75px
left padding is 100px
+ 5
If you do not specify the side where you want to apply padding, it is automatically applied on all 4 sides.
+ 2
1. If you provide only one value, it sets that value for all sides.
2. If you set two values, it sets the first one for top and bottom and the second for left and right
3. If you set three values, first is top, second is left and right, third is bottom
4. Set 4 values, they are in this order: top, right, bottom, left
0
For all sides.