I have seen two notations:
padding: 0px
and just
padding: 0
I would like to know which is the correct way or syntactically correct way.
I have seen both ways in different places:
I have seen two notations:
padding: 0px
and just
padding: 0
I would like to know which is the correct way or syntactically correct way.
I have seen both ways in different places:
Both are syntactically correct and correct in general. When you have 0 of anything, it is still 0, so in terms of value, 0
is the same as 0px
which is the same as 0[AnyMeasurementHere]
. If you wanted to update the style later, and you were using pixels, you might keep it at 0px
to remind yourself that you are using pixels on this element for its padding.