为什么 IE6 无法正确渲染此边框?

发布于 2024-12-21 19:32:53 字数 684 浏览 0 评论 0 原文

我目前正在完成一个客户希望在所有浏览器上运行的网站。然而,似乎存在一个我无法解决的 CSS 问题。此页面周围的边框似乎是从页面中间开始的,而不是围绕整个页面。但它适用于所有其他浏览器。我猜测这是一个浮动问题,但是下面的 #contact-form 基本上应用了相同的 CSS,但边框仍然围绕着它,而 #info似乎突破了境界。

有问题的网页是 http://lunaskymoda.co.uk/contact-us/

唯一的验证错误是未注册的关键字“Nextgen”,但我怀疑这就是问题所在。我花了一整天的时间来解决这个问题,但似乎无法对为什么会发生这种情况提出合理的解释。

可能产生错误的 HTML 元素的 CSS 是:

#main #main-content {
border: 1px solid white;
display: block;
margin: 12px 0;
background: black;
}

.contact #main-content .info {
margin: 10px;
width: 300px;
font-size: 14px;
color: white;
float: right;
display: block;
}

I am currently finishing a site that the client wants to work on all browsers. However, there seems to be a CSS issue which I can not get around. The border around this page seems to start from the middle of the page, as opposed to surrounding the entire page. It works on all other browsers though. I am guessing that it is a float problem, but the #contact-form underneath has basically the same CSS applied to it but the border still surrounds it, while the #info seems to have broken out of the border.

The webpage in question is http://lunaskymoda.co.uk/contact-us/

The only validation error is with an unregistered keyword "Nextgen", but i doubt that is the problem. I have spent an entire day tackling this and cannot seem to come up with a reasonable explanation as to why this is happening.

the CSS for the possible HTML elements producing the error are:

#main #main-content {
border: 1px solid white;
display: block;
margin: 12px 0;
background: black;
}

.contact #main-content .info {
margin: 10px;
width: 300px;
font-size: 14px;
color: white;
float: right;
display: block;
}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

话少情深 2024-12-28 19:32:53

您不是第一个遇到 ie6 问题的人:)
问题当然是clear类的“clear:both”没有得到尊重,所以你需要破解它。
这是一种可能的方法:
http://damienhowley.wordpress.com/2009/04/ 01/ie6-hack-replacing-clearboth/
您也可以尝试替换

通过

You're not the first one to have issues with ie6 :)
The problem is of course the "clear: both" of the clear class not being honoured, so you need to hack it.
Here's a possible approach:
http://damienhowley.wordpress.com/2009/04/01/ie6-hack-replacing-clearboth/
You may also try to replace the <div class="clear"></div> by <br clear="all">.

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