2010-04-07 28 views
2

當我下面有這個<table>時,文本在FF和IE8中根據需要進行換行,但是當我以兼容模式或IE7運行時,文本不換行,寬度以前基本上被忽略了。任何方式來解決這個問題?這是一個簡單的例子。文字在IE7,IE8和FF中的差異

<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> 
+0

你不能同時設置在第二排的寬度,第一個單元格的任何原因? – graphicdivine 2010-04-07 19:40:13

+0

不,我絕對沒有理由不這樣做。 :) – Gabe 2010-04-07 19:48:17

+0

那麼,你在那裏。 – graphicdivine 2010-04-07 19:53:10

回答

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>