Anton Krylov Anton Krylov - 22 days ago 9
CSS Question

Set padding to element(div)

I'm trying set padding to my element like:

padding: 12 6 6 0px;


But google chrome labels it as invalid property value.

Setting padding works like this:

padding: 0 0 0 6px;


Where my mistake or ignorance?

Moo Moo
Answer

You should use measurement unit (in your case px) for every value. So, your padding property should have a value of: padding: 12px 6px 6px 0px;

Comments