Workaround wanted
-
I've spent quite some time developing a table component which makes output like this:
<div style="width: 100%; overflow: scroll;">
<table>
<tr>
<td style="width: 100px;"> Column 1 </td>
<td style="width: 100px;"> Column 2 </td>
<td style="width: 100px;"> Column 3 </td>
</tr>
</table>
</div>The idea is that the table will take up as much space as it can, and have scrollbars when column widths overflow container size. It works great when added directly in the body tag, but if I put it inside a td tag, IE suddenly allows the div and table to expand, even if the parenting table and td are also set to 100% width. I'm too lazy to look it up, but it doesn't make sense, and it works in Mozilla so it must be a bug in IE. Whatever it is, I need to make it function, so does anybody know a workaround? "God doesn't play dice" - Albert Einstein "God not only plays dice, He sometimes throws the dices where they cannot be seen" - Niels Bohr
-
I've spent quite some time developing a table component which makes output like this:
<div style="width: 100%; overflow: scroll;">
<table>
<tr>
<td style="width: 100px;"> Column 1 </td>
<td style="width: 100px;"> Column 2 </td>
<td style="width: 100px;"> Column 3 </td>
</tr>
</table>
</div>The idea is that the table will take up as much space as it can, and have scrollbars when column widths overflow container size. It works great when added directly in the body tag, but if I put it inside a td tag, IE suddenly allows the div and table to expand, even if the parenting table and td are also set to 100% width. I'm too lazy to look it up, but it doesn't make sense, and it works in Mozilla so it must be a bug in IE. Whatever it is, I need to make it function, so does anybody know a workaround? "God doesn't play dice" - Albert Einstein "God not only plays dice, He sometimes throws the dices where they cannot be seen" - Niels Bohr
-
Hi Jan, In the style of the parent table, you simply set the
table-layout
property tofixed
:<TABLE width="100%" style="TABLE-LAYOUT: fixed; WIDTH: 100%" ...>
Thanks! It's working perfectly. :-D "God doesn't play dice" - Albert Einstein "God not only plays dice, He sometimes throws the dices where they cannot be seen" - Niels Bohr