There's a lot of things to get your head around if you search for css box model.
The easiest way is to do this (or similar) at the top of your CSS, resetting all browsers default paddings and margins.
Code:
*, html, body { padding: 0; margin: 0;}
Each browser has their own varied default padding and margins on some elements and doing this can get rid of them. Be warned, you'll need to add padding and margin to each element as you need though (such as headers, paragraphs).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.