2010-11-29 88 views
1

我有一個DIV託管版式的網站設置。問題是,在IE 6下這個佈局中斷了。 alt textInternet Explorer 6 - DIV問題

alt text

這是CSS:

#bg{ 
     position:fixed; 
     top:0; 
     left:0; 

     /* Preserve aspect ratio */ 
     min-width:100%; 
     min-height:100%; 
} 
#basic { 
    width: 902px; height: auto; margin-left: auto; margin-right: auto; position: relative; padding-bottom: 50px; 
} 
#logo{ 
    width: 902px; height: 400px; position: absolute; top: 17px; 
} 
#navbar{ 
    width: 902px; height: 23px; top: 280px; position:absolute; 
} 

#content{ 
    width: 802px; height: auto; top: 325px; position: absolute; background-color: white; padding-top: 50px;padding-left: 50px; padding-right: 50px; padding-bottom: 50px 
} 
#csob{ 
    width: 100px; height:100px; bottom:0px; right: 0px; position: absolute; 
} 
#titulni_strana {width:902; height:auto; top:325px; position:absolute} 

PHP:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
<html> 
<head> 
<link rel="shortcut icon" href="http://protechp.cz/zimnihrycsob/images/favicon.ico"> 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" > 
<link href="default.css" rel="stylesheet" type="text/css" > 
<title>Zimni Hry CSOB</title> 
<!--[if lt IE 7]> 
     <script type="text/javascript" src="unitpngfix.js"></script> 
<![endif]--> 
</head> 

<body> 
<img src="images/background-gradient-ok.jpg" id="bg" alt="pozadi"> 
<div id="basic"> 

<div id="logo"> 
<center><img src="images/logo3.png" alt="logo"></center> 
</div> 

<?php include ("./menu.php") ?> 

<div id="titulni_strana"> 
<img src="images/titulni_strana.jpg" alt="titulni strana"> 
</div> 

</div> 

</body> 
</html> 
+0

請張貼正在破解的部分的代碼 – Jimmy 2010-11-29 20:15:48

+0

我建議在http://validator.w3.org/中驗證您的html源代碼多次無效的html被其他瀏覽器免責 – 2010-11-29 20:17:31

+0

我前幾天讀過一篇關於HTML的文章。它基本上對網絡開發者不滿,他們表示他們不會在他們的網站上支持IE6 ......呃,我不會對你不滿:) – 2010-11-29 20:18:21

回答

1

它看起來好像有問題,這裏不僅僅是簡單的CSS。

首先,確保您的HTML有效。看起來好像第一張圖片中的瀏覽器比IE6更寬鬆,因爲圖片在一張圖片中被破壞,而另一張則沒有。

另外,IE6不支持min- *屬性。您需要改爲使用高度和寬度,無論是在僅IE6的樣式表中,還是使用星號攻擊來僅以IE6爲目標。

編輯:此外,IE6不支持固定位置。相反,您需要使用絕對定位。

0

看來問題是圖像不加載,而不是CSS。

嘗試刪除樣式表,所有CSS和ie6 PNG修復JavaScript只是爲了確認您的圖像正在使其頁面,因爲它看起來不像一個CSS問題給我。一個現場的例子會很好。