[转]ie6下表格宽度超宽bug,问题的解决方法(兼容ie6,7,8,ff)

制作页面时,页面左右布局时,而右侧宽度是自适应宽度时,在右侧DIV里插入宽度100%的表格时,在IE6下就是超出宽度,而其它IE7,8,FF都正常显示,这种情况用height:1%;方法就能解决了,简单实用。


演示如:只要把height:1%;加到你的TAB外层DIV的样试里就行了

.content{height:1%;}


<div class="content">

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>

 

 

制作页面时,页面左右布局时,而右侧宽度是自适应宽度时,在右侧DIV里插入宽度100%的表格时,在IE6下就是超出宽度,而其它IE7,8,FF都正常显示,这种情况用height:1%;方法就能解决了,简单实用。


演示如:只要把height:1%;加到你的TAB外层DIV的样试里就行了。

.content{height:1%;}


<div class="content">

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>

posted @ 2010-11-09 10:47  沉默杨  阅读(1286)  评论(0编辑  收藏  举报