CSS Tutorial – Reset All Margins & Padding


Rengga Dev – This has become a very popular technique lately, and for good reason. It removes all default margin and padding for every object on the page, no holds barred, regardless of browser. This provides a nice clean slate for design and ensures that all spacing is intentional, explict, and ubiquitous across browsers. There is no reason not to do this.

Some people like to include border: 0; as a part of it, but it has been found to not be effective in all situations (including the annoying  borders), so why bother…

* {
margin: 0;
padding: 0;
}

 

Nandemo Webtools

Leave a Reply