2012-11-02 53 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> 
相關問題