2012-07-28 39 views
0

我正在創建將表標記轉換爲div的jsp標記的過程。這是我的標籤生成的代碼。在ie9中,藍色div和黑色div之間有空格。我已經嘗試過所有的事情,以正確的方式解決問題。請:-(幫忙,我把它逐字因爲我不知道,如果IE9做了一些奇怪的白色空間。CSS清除導致div之間的空間

<!-- AUTO GENERATED TABLE ELEMENT --> 
<div style=" "> 

<!-- AUTO GENERATED TABLE:ROW ELEMENT --> 
<div style="clear:left; margin: 0px; padding: 0px;"> 

<!-- AUTO GENERATED TABLE:CELL ELEMENT --> 
<div style="float:left; background-color: blue; height: 50px; width: 300px; text-align: center; margin: 0px; padding: 0px;"> 
      <!--<p style="color: white;">You have reached this page in error</p>--> 
     </div> 
<!-- AUTO GENERATED TABLE:CELL ELEMENT --> 

<!-- AUTO GENERATED TABLE:CELL ELEMENT --> 
<div style="float:left; background-color: blue; height: 50px; width: 300px; text-align: center; margin: 0px; padding: 0px;"> 
      <!--<p style="font-weight: bold; color: red;">No matching path</p>--> 
     </div> 
<!-- AUTO GENERATED TABLE:CELL ELEMENT --> 
    </div> 
<!-- AUTO GENERATED TABLE:ROW ELEMENT --> 

<!-- AUTO GENERATED TABLE:ROW ELEMENT --> 
<div style="clear:left; margin: 0px; padding: 0px;"> 

<!-- AUTO GENERATED TABLE:CELL ELEMENT --> 
<div style="float:left; background-color: black; color: white; height: 600px; width: 600px; text-align: center; margin: 0px; padding: 0px;"> 
      <font style="font-size: 50px">&iquest;</font> 
     </div> 
<!-- AUTO GENERATED TABLE:CELL ELEMENT --> 
    </div> 
<!-- AUTO GENERATED TABLE:ROW ELEMENT --> 
</div> 
<!-- AUTO GENERATED TABLE ELEMENT --> 
+0

?你有此頁的doctype 嘗試並刪除空白,它可能關係 哎呀,儘量明確:既 – Andy 2012-07-28 00:36:15

+0

@ user1538100我想你可能用的doctype有它,我還在測試,但應該修復它。 :-) – rubixibuc 2012-07-28 00:44:51

+0

@ user1538100把這個作爲答案,我一定會接受它 – rubixibuc 2012-07-28 00:47:54

回答

3

看的像你缺少DOCTYPE,這將使IE排序本身出