2012-07-10 76 views
1

請查看此鏈接 - http://sklepylaserowe.test.dih.pl/。 它可以在Firefox,Chrome和Opera中很好地顯示 - 但它在Internet Explorer中很混亂(8和9)。可能是什麼原因呢? (從列表「Wybierzwojewództwo」,請選擇「śląskie」,點擊「Dalej >>」,並點擊出現的鏈接,以隱藏該覆蓋窗口)CSS,HTML - 網站在Internet Explorer中顯示非常錯誤

許多基本的CSS命令不起作用,如:

margin:0 auto; 
+0

'保證金:0 auto'不受IE :( – silentw 2012-07-10 13:53:08

+2

@silentw支持 - 它不是由IE 5.5和更早版本支持它是由支撐。 IE 6和更新(但怪癖模式模擬IE 5.5的錯誤) – Quentin 2012-07-10 13:54:53

回答

9

您無法使用Doctype啓動文檔,這會觸發Quirks mode,其中瀏覽器模擬其古老祖先的錯誤。

不支持用於居中的自動頁邊距是IE中的這些錯誤之一(它在IE 6中已修復)。

Validate你的HTML。您不能在Doctype之前放置任何標籤。

+0

doctype存在,但在錯誤的地方... – Christoph 2012-07-10 13:55:04

+0

@Christoph - 因此「無法啓動」,最後一段而不是「失蹤」:) – Quentin 2012-07-10 13:56:04

+0

@Christoph其中 - 從MS IE的角度來看 - 與沒有相同... – feeela 2012-07-10 13:56:43

1
<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script> 
<script type="text/javascript" src="js/jquery/jquery-1.4.4.min.js"></script> 
<script type="text/javascript" src="js/geo.js"></script> 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 

更改上面的代碼

<!DOCTYPE html> 
<html> 
    <head> 
    <script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script> 
    <script type="text/javascript" src="js/jquery/jquery-1.4.4.min.js"></script> 
    <script type="text/javascript" src="js/geo.js"></script> 
    ... 
+1

這仍然是錯誤的。腳本元素不允許在頭部/主體元素之外。 – Quentin 2012-07-10 13:57:30

+0

我提到了命令..編輯了答案.. :) – madhairsilence 2012-07-10 13:59:21

相關問題