我目前正在完成一个客户希望在所有浏览器上运行的网站。然而,似乎存在一个我无法解决的 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;
}
发布评论
评论(1)
您不是第一个遇到 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">.