2012-11-02 54 views
-1

http://www.utahvalleyhealthclinic.com/services在出现所有版本的IE时,页脚背景会出现两次。我检查过HTML,并且页脚元素似乎在IE的HTML中出现了两次,但在Chrome中却没有。在Internet Explorer中出现两次的页脚背景

我不清楚为什么会发生这种情况,因为我不记得将代码放在那里两次,我认为它会显示在Chrome中,如果我有。我使用了一个标记验证器来检查页面,它说我错过了一大堆开始和结束标记(当我看代码时,它们实际上存在)。

有谁知道为什么会发生这种情况?

+0

如果你不能找到解决的办法,你可以把作为临时修复。 – dkroy

+2

始终信任[在线HTML验证器](http://validator.w3.org/)。您[错过了某些内容](http://validator.w3.org/check?uri=http%3A%2F%2Fwww.utahvalleyhealthclinic.com%2Fservices&charset=%28detect+automatically%29&doctype=Inline&group=0)。 – Sparky

回答

1

此:

<a href="http://www.utahvalleyhealthclinic.com/patient-forms"> 

显然,你没有关闭它,打破东西。

尝试使用IE(F12)检查并同时查看代码以查找发生了什么问题。

基本上IE知道你有两个“页脚”DIV,但Chrome显示只有一个。

对于结束标记,照顾与自闭的像<br />而不是<br><img ... />,而不是<img ...>

尝试像NetBeans和使用自动缩进(或谷歌等ptions)。帮助您找到忘记关闭的标签,并查看是否所有东西都应该放在哪里。

2

在页脚处,有两个锚定标记<a>未关闭。解决这个问题,你的问题将得到解决。

工作演示:http://jsfiddle.net/DpGyT/1/

变化

<div class="lbtns"> 
<a href="http://www.utahvalleyhealthclinic.com/contact-us"><img src="http://www.uvhc.mikeandjewels.com/wp-content/themes/thesis_185/custom/images/mapsbtn.png"> 
</div> 
<div class="lbtns"> 
<a href="http://www.utahvalleyhealthclinic.com/patient-forms"><img src="http://www.uvhc.mikeandjewels.com/wp-content/themes/thesis_185/custom/images/frmsbtn.png"> 
</div> 

<div class="lbtns"> 
    <a href="http://www.utahvalleyhealthclinic.com/contact-us"><img src="http://www.uvhc.mikeandjewels.com/wp-content/themes/thesis_185/custom/images/mapsbtn.png"></a> 
</div> 
<div class="lbtns"> 
    <a href="http://www.utahvalleyhealthclinic.com/patient-forms"><img src="http://www.uvhc.mikeandjewels.com/wp-content/themes/thesis_185/custom/images/frmsbtn.png"></a> 
</div> 
相关问题