开发者

Inherited margins displaying incorrectly in Firefox

Pretty simple problem, but am having开发者_Python百科 trouble finding the answer.

Not sure what is happening, but I am getting some kinda of spacing above my header/nav when I apply the rule #content {margin: 10px 0 10px 0}

Am I being a total numpty today? Please help.

"Link removed"

Edited my 2nd act of numptiness today


I cannot see your page so it's a bit of a shot in the dark but I think you are having a classic case of the "collapsing margins".

You should give #container a padding to prevent the margins from collapsing.

#container {
 padding: 1px; /* padding prevents collapsing margins of #content */
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜