2009-10-25 270 views
0

可以檢出問題here的CSS問題IE6,DIV寬度不一樣寬父

DIV#target不一樣寬父格在IE6,只有在IE6

您可以通過點擊右上方的編輯進行修改。

對於那些誰也看不到的內容,這裏是HTML的一部分:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> 

<head> 
    <meta name="verify-v1" content="IWNE8753ok3185rownXmHDc6EZFBP/eMDlHCHUQPaEk=" /> 
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> 
    <meta http-equiv="Content-Language" content="en-us" /> 


    <title>51Hired</title> 
    <link rel="shortcut icon" href="static/favicon.ico" /> 
    <link href="style/layout.css" rel="stylesheet" type="text/css" /> 
    <link href="style/index.css" rel="stylesheet" type="text/css" /> 
</head> 

<body> 
<div id="menus"> 
    <a href="/index.html?edit">EDTI</a>&nbsp;&nbsp; 
</div> 
<div class="clear"></div> 
<div id="body" style="width:850px;border:1px solid blue;"> 
    <div id="target" style="border:1px solid red;width:100%;margin:0;"> 
    something 
    </div> 


    <div class="biankuang mag_t"> 
     <div class="sub_i_title"> 
      <a href="/jobs.php" style="float:right;color:#D64F00;margin-right:10px;">More&raquo;&raquo;</a> 
      <h2>Hostest jobs</h2>                
     </div> 
     <div class="sub_i_b clear"> 

      <ul class="info"> 
      <li><span>2009-10-05</span><a class="job-hyperlink" title="\u670d\u88c5\u8bbe\u8ba1\u5e08" href="/jobs/1172/Designer" target="_blank">Designer</a></li><li><span>2009-09-21</span><a class="job-hyperlink" title="\u9500\u552e\u7ecf\u7406" href="/jobs/158/Manager" target="_blank">Manager</a></li><li><span>2009-09-20</span><a class="job-hyperlink" title="\u517c\u804c\u4e1a\u52a1\u7ecf\u7406" href="/jobs/580/Manager" target="_blank">Manager</a></li><li><span>2009-09-21</span><a class="job-hyperlink" title="\u9500\u552e\u4ee3\u8868" href="/jobs/159/SaleRepresentative" target="_blank">Sale Representative</a></li><li><span>2009-10-01</span><a class="job-hyperlink" title="\u4ea7\u54c1\u7814\u53d1\u5de5\u7a0b\u5e08" href="/jobs/744/Engineer" target="_blank">Engineer</a></li><li><span>2009-10-05</span><a class="job-hyperlink" title="\u4e1a\u52a1\u4e3b\u7ba1" href="/jobs/309/Manager" target="_blank">Manager</a></li><li><span>2009-10-05</span><a class="job-hyperlink" title="\u4e1a\u52a1\u7ecf\u7406" href="/jobs/61/Manager" target="_blank">Manager</a></li><li><span>2009-10-05</span><a class="job-hyperlink" title="\u5ba2\u6237\u7ecf\u7406" href="/jobs/228/Customer Manager" target="_blank">Customer Manager</a></li><li><span>2009-10-05</span><a class="job-hyperlink" title="\u9500\u552e\u4ee3\u8868" href="/jobs/242/Sale Representative" target="_blank">Sale Representative</a></li><li><span>2009-10-04</span><a class="job-hyperlink" title="QA\u7ba1\u7406" href="/jobs/288/QA Management" target="_blank">QA Management</a></li>    
      </ul> 

     </div> 
    </div> 


</div> 

</body> 
</html> 
+1

它的空白頁面 – 3zzy 2009-10-25 13:10:38

+0

因爲你提交了一個空白頁面,所以遊戲結束了...... – Mask 2009-10-25 14:34:53

回答

1

這條線鏈接的CSS(style/index.css):

.sub_i_b ul li{float:left; margin-right:45px; width:350px;} 

應改爲:

.sub_i_b ul li{float:left; padding-right:45px; width:350px;} 

的利潤率,因爲它被應用到外寬在IE6中扔東西了指定的區域並將整個部分向外推到div#target上述寬度樣式無法解釋的位置。

填充在這個實例中的工作原理是一樣的,並保持寬度工作。

+0

哦,它的工作,但我仍然不知道你的意思是「它適用於該地區的外部」,你能解釋它嗎? – Mask 2009-10-26 04:13:32

+0

@ eof,你可以通過一個簡單的例子來闡明它嗎? – Mask 2009-10-26 05:19:14

0

我看到的網頁,但現在它是空的。人們是否在編輯它並刪除內容?

無論如何,我會記住,IE計數邊界不同,並可能改變確切的寬度。這回答了你的問題了嗎?

+0

我刪除了空白頁面,現在對大家都應該是OK的。不要再提交空白頁面... – Mask 2009-10-25 23:47:02