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

有帮助吗?

解决方案

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.

其他提示

According to Erik Meyer it's a remnant from Mosaic. He said it at the end of Web Platform podcast episode 139

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top