Use "px" and "%" as for one element

- this is the right to use "px" and "%" as for one element of type

.box{
padding:10px 2% 0 3%;
}

this right to use in css.

+3
source share
5 answers

As stated in CSS 2.1 specification to fill out (emphasis mine)

The padding property is a shorthand property for setting padding-top, padding-right, padding-bottom, and padding-left in the same place in the stylesheet.

, . , paddings , paddings . , , - , - . , , , .

, padding: 10px 2% 0 3%;

padding-top: 10px;
padding-right: 2%;
padding-bottom: 0;
padding-left: 3%;

CSS.

!

+3

, , , , , , , .

+1

, . , ?

0

( ), . ( )

0

. :

padding-top: 10px;
padding-right: 2%;
padding-bottom: 0;
padding-left: 3%;

- . .

0

Source: https://habr.com/ru/post/1747965/


All Articles