文本包含IE7,IE8和FF中的差异

时间:2010-04-07 19:20:31

标签: css cross-browser

当我在下面有<table>时,文本在FF和IE8中根据需要进行换行,但是当我在兼容模式或IE7中运行时,文本不会换行,并且前一个的宽度基本上被忽略。有办法解决这个问题吗?这是一个简化的例子。

<table>
   <tr>
      <td style="width:125px">
      hi
      </td>
      <td>bye</td>
   </tr>
   <tr>
      <td>
      line of text that will equal more than the above width
      </td>
     <td>bye</td>
   </tr>
</table>

1 个答案:

答案 0 :(得分:1)

<table>
   <tr>
      <td style="width:125px">
      hi
      </td>
      <td>bye</td>
   </tr>
   <tr>
      <td  style="width:125px">
      line of text that will equal more than the above width
      </td>
     <td>bye</td>
   </tr>
</table>