css - Why HTML table show like this in IE? -
why first column width large set fixed width in ie?.
my code:
<!doctype html> <html > <head> <title>test</title> </head> <body> <table width="100%" border="1"> <tr> <td style="width:180px;"> 2 </td> <td>6 </td> </tr> <tr> <td colspan="2" > lskdjf lskfj lskjf lksfj lksf lksd flksflksfj lskf jlksf jlk lskdjf lskfj lskjf lksfj lksf lksd flksflksfj lskf jlksf jlk lskdjf lskfj lskjf lksfj lksf lksd flksflksfj lskf jlksf jlk lskdjf lskfj lskjf lksfj lksf lksd flksflksfj lskf jlksf jlk lskdjf lskfj lskjf lksfj lksf lksd flksflksfj lskf jlksf jlk lskdjf lskfj lskjf lksfj lksf lksd flksflksfj lskf jlksf jlk lskdjf lskfj lskjf lksfj lksf lksd flksflksfj lskf jlksf jlk lskdjf lskfj lskjf lksfj lksf lksd flksflksfj lskf jlksf jlk lskdjf lskfj lskjf lksfj lksf lksd flksflksfj lskf jlksf jlk lskdjf lskfj lskjf lksfj lksf lksd flksflksfj lskf jlksf jlk lskdjf lskfj lskjf lksfj lksf lksd flksflksfj lskf jlksf jlk lskdjf lskfj lskjf lksfj lksf lksd flksflksfj lskf jlksf jlk lskdjf lskfj lskjf lksfj lksf lksd flksflksfj lskf jlksf jlk lskdjf lskfj lskjf lksfj lksf lksd flksflksfj lskf jlksf jlk lskdjf lskfj lskjf lksfj lksf lksd flksflksfj lskf jlksf jlk lskdjf lskfj lskjf lksfj lksf lksd flksflksfj lskf jlksf jlk lskdjf lskfj lskjf lksfj lksf lksd flksflksfj lskf jlksf jlk lskdjf lskfj lskjf lksfj lksf lksd flksflksfj lskf jlksf jlk lskdjf lskfj lskjf lksfj lksf lksd flksflksfj lskf jlksf jlk lskdjf lskfj lskjf lksfj lksf lksd flksflksfj lskf jlksf jlk </td> </tr> </table> </body> </html>
output:
first column large set width of first column 180px
<td style="width:180px;">
local internet explorer mode "fix"
i'm able reproduce problem changing ie's document mode ie5 quirks, can assume that's have ie set to. default, jsfiddle should load in standards mode whichever version you're using.
to fix this, hit f12 on keyboard open ie's developer tools, on top bar of ui appears select document mode , change "standards (page default)":
ie5 quirks mode css fix
alternatively can fix in ie5 quirks mode giving table fixed table-layout
. in css, add:
table { table-layout:fixed; }
here updated jsfiddle demo.
Comments
Post a Comment