reset.css帮助不重置

发布于 2024-09-27 07:38:22 字数 599 浏览 5 评论 0原文

我有一个看起来像这样的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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

岁月染过的梦 2024-10-04 07:38:22

在我看来,您重置的样式表正确地删除了 body 元素上的边距和填充。这让我认为是身体内部的某种东西将你的内容推离了位置。

快速浏览一下 firebug 后...

看起来 default.css 第 20 行的样式需要是:

h1 {
    font-size:28px;
}

只需删除 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:

h1 {
    font-size:28px;
}

Just remove the margin-bottom:25px.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文