Does CSS Support Negative Padding?

As per the spec, negative values for CSS padding properties are considered invalid. The padding properties can only have length or percentage as a valid value.

Depending on the browser, negative values for the padding properties are either ignored or converted to the nearest value that can be supported (which, in this case, would be 0).


This post was published by Daniyal Hamid. Daniyal currently works as the Head of Engineering in Germany and has 20+ years of experience in software engineering, design and marketing. Please show your love and support by sharing this post.