tags:

views:

15

answers:

1

I'd like to have the width of my table 100% of screen width - so flexible to different screen sizes.

is it possible to have my columns automatically resize proportionately?

I've tried give the td's percentage widths but this doesnt seem to work, firebug shows that the tbody isnt filling the tables width?

        <table class="">
            <tr class="headings">
                <td class="entry">
                </td>
                <td class="calendar">Availability Calendar
                </td>
                <td class="deals">Last Minute Deals
                </td>

                <td class="ann">Announcements
                </td>
                <td class="banners">Banners
                </td>
            </tr>


        </table>
+4  A: 

You just have to set the width of the table to 100%, and it will be the width of it's parent. The columns will automatically be sized according to their content, unless you specify anything else for some columns.

The columns will always fill the width of the table, so if the specified widths are less than 100% or smaller than the pixel size of the table, they will be larger than specified.

Guffa