Paul Designer Paul Designer - 3 months ago 22
CSS Question

Im using Normalize css - why does it have 40px padding?

I have downloading the responsive framwework http://996grid.com/ and in the Normalize.css it has default settings of

padding: 0 0 0 40px;
for various items. for example

menu,
ol,
ul {
padding: 0 0 0 40px;
}
dd {
margin: 0 0 0 40px;
}


Can someone explain the reasoning of this as when I add a ul it adds 40px onto it... If I remove the 40px in the normalize will it effect browser support?

Thanks for your help

Answer

In the official Normalize.css (available at https://github.com/necolas/normalize.css/), there is no such padding, however most browsers will add this padding anyway to simply give the list some indentation from regular text.

If you want to remove this, simply modify the provided CSS or override it within your own CSS:

menu,
ol,
ul {
    padding: 0;
}
dd {
    margin: 0;
}

It's up to you to style your own documents however you like; aside from the default styles defined in the HTML specification, most browser default styles are simply there to make simple unstyled documents a bit prettier.