reset.css帮助不重置
我有一个看起来像这样的reset.css样式表,
HTML * {
margin: 0;
padding: 0;
padding: 0;
outline: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
text-decoration:none;
}
body {
font-family:Arial,Helvetica,sans-serif;
font-size: 83%;
}
ul,
ol,
li {
list-style:none;
}
a,
hover,
visited {
color:#06508b;
}
a,
img,
fieldset {
border: 0;
}
现在这应该使我的内容与浏览器窗口的顶部齐平,但事实并非如此,任何人都可以看到这样做的原因吗?您可以在此处查看问题 http://www.ibdnetwork.co.uk
I have a reset.css style sheet that looks like this,
HTML * {
margin: 0;
padding: 0;
padding: 0;
outline: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
text-decoration:none;
}
body {
font-family:Arial,Helvetica,sans-serif;
font-size: 83%;
}
ul,
ol,
li {
list-style:none;
}
a,
hover,
visited {
color:#06508b;
}
a,
img,
fieldset {
border: 0;
}
Now this should make my content sit flush with the top of the browser window however it is not, can anyone see a reason for this? You can see the problem here http://www.ibdnetwork.co.uk
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在我看来,您重置的样式表正确地删除了 body 元素上的边距和填充。这让我认为是身体内部的某种东西将你的内容推离了位置。
快速浏览一下 firebug 后...
看起来 default.css 第 20 行的样式需要是:
只需删除
margin-bottom:25px
即可。It looks to me that you're reset stylesheet is correctly removing the margin and padding on the body element. This leads me to think that it's something inside the body that is pushing your content out of position.
After a quick look in firebug...
It looks like your style on line 20 of default.css needs to be:
Just remove the
margin-bottom:25px
.