How to reset all margins and padding in CSS

Good day y’all, I’m pretty confused on how to reset margins and padding in CSS.
Thanks in advance

Use the *selector and declare what you want to reset, like so:

margin: 0;
padding: 0;

Thanks @samolex , also how do I set my “box-sizing” property?

Just insert box-sizing: border-box; into the code above and it affects all elements on that page. The default value is content-box. You could look it up on MDN

1 Like