I have a simple, I want a scrollable table with aligned columns.
I tried this (from https://stackoverflow.com/a/11483686/1599054):
<table>
<thead>
<tr><th>loooooooooooooong</th><th>headers</th></tr>
</thead>
<tbody>
<tr><td>t</td><td>t</td></tr>
<tr><td>t</td><td>t</td></tr>
<tr><td>t</td><td>t</td></tr>
</tbody> </table>
And the CSS:
thead { display:block; background: green; margin:0px; cell-spacing:0px; left:0px; }
tbody { display:block; overflow:auto; height:100px; }
th { height:50px; }
td { height:50px; background:blue; margin:0px; cell-spacing:0px;}
You can see it here: http://jsfiddle.net/Rfgm2/1/
My problem is that I have a small content but big headers, is their a mean to "dynamically" aligne them?