DEV Community

Cover image for Answer: Can I set a background-color to margins and padding?
paul-coder-22
paul-coder-22

Posted on

Answer: Can I set a background-color to margins and padding?

It's not possible to set the background-colors of the padding and margin attributes. They are meant to be transparent, or invisible, and used solely for positioning purposes.

However, I have heard this question many times, and I completely understand wanting to show the padding and margins for purely educational…

Oldest comments (0)