2010-05-05 86 views
3

下面的表格是body標籤中的唯一元素 - 在Firefox 3中顯示效果不錯,但我認爲它在IE7中看起來不太好。在嵌套表格和上面的行之間有一個奇怪的空間。你能否建議一些方法來消除奇怪的空間? - 謝謝IE中的奇怪空間 - 有什麼建議嗎?

<table> 
    <tr> 
     <td colspan="14"> 
     <div> 
     <table id="value_table" width="100%" border="0" cellspacing="0" cellpadding="2" style="border-collapse: collapse; display: block"> 
      <tr> 
       <td height="20" align="center" valign="Middle" class="Header"> 
       <div align="left"><b>  Search Relationships</b></div> 
       </td> 
      </tr> 
      <tr> 
      <td>This is working</td> 
      </tr> 
      <tr valign="top"> 
       <td>second row</td> 
       <td nowrap="nowrap" class="GrayRow" valign="top" border="1" height="40" align="center" style="border: none"> 
       just above the table 
       <table border="1" cellpadding="0" cellspacing="0" align="left"> 

        <tr valign="top"> 
         <td>new row inside table</td> 
         <td class="GrayRow" nowrap="nowrap"> <b>Select:</b>   <select id="j_id19:browseType" name="j_id19:browseType" size="1" class="TextBlackNormal" onchange="showDynamicBox(this);"> <option value="NAME">User Name</option> <option value="ID">User Id</option> <option value="IBD/Office/IP">IBD/Office /IP</option> <option value="APA#">APA#</option></select>    </td> 
         <td> 
         <div id="dynamicBox1" style="display: block"><input id="j_id19:j_id23" name="j_id19:j_id23" type="text" value="" size="32" class="TextBlackNormal" /></div> 
         </td> 
             
         <td> 
         <div id="dynamicBox2" style="display: none"><input id="j_id19:j_id25" name="j_id19:j_id25" type="text" value="" size="32" class="TextBlackNormal" /></div> 
         </td> 
             
         <td> 
         <div id="dynamicBox3" style="display: none"> 
         IBD   <input id="j_id19:ibdval1" name="j_id19:ibdval1" type="text" value="" maxlength="3" size="3" onkeyup="goToNextFocus(this);" class="TextBlackNormal" />   
         OFF   <input id="j_id19:ibdval2" name="j_id19:ibdval2" type="text" value="" maxlength="3" size="3" onkeyup="goToNextFocus(this);" class="TextBlackNormal" />   
         IP    <input id="j_id19:ibdval3" name="j_id19:ibdval3" type="text" value="" maxlength="3" size="3" onkeyup="goToNextFocus(this);" class="TextBlackNormal" /> 
         </div> 
         </td> 
             
         <td> 
         <div id="dynamicBox4" style="display: none"> 
         Average Price Account#    <input id="j_id19:apaval1" name="j_id19:apaval1" type="text" value="" maxlength="3" size="3" onkeyup="goToNextFocus(this);" class="TextBlackNormal" />  <input id="j_id19:apaval2" name="j_id19:apaval2" type="text" value="" maxlength="3" size="3" onkeyup="goToNextFocus(this);" class="TextBlackNormal" />  <input id="j_id19:apaval3" name="j_id19:apaval3" type="text" value="" maxlength="3" size="3" onkeyup="goToNextFocus(this);" class="TextBlackNormal" /> 
         </div> 
         </td> 
                
         <td class="GrayRow" nowrap="nowrap"> 
         <div id="msg_multiple_inputs" style="display:none"> 
         <font color="#990000" size="1">Enter multiple separated by 
         commas   </font> 
         </div> 
                                           
         </td> 
         <td><input id="j_id19:display" name="j_id19:display" type="submit" value="Display" class="TextBlackNormal" /></td> 
        </tr> 
       </table> 
       </td> 
      </tr> 
     </table> 
     </div> 
     </td> 
    </tr> 

</table> 

回答

1

我想到的第一件事是:cellpadding/cellspacing。嘗試將每個設置爲0.

2

這是IE的許多佈局錯誤之一,這些錯誤令人煩惱。我可以建議一些東西......

  • 將含有細胞的填充頂到0EM
  • 將嵌套表的上邊距,以0EM
1

添加CELLSPACING,CELLPADDING和邊界爲0到您的桌面。