Resize table column

Discussion in 'ASP .Net' started by Yama, Nov 9, 2004.

  1. Yama

    Yama Guest

    Hi,

    How can I make it resizable?

    For example:

    <pre>

    <!-- datagrid Header -->
    <table class="TableHeader" id="tblHeader" border="1" runat="server">
    <tr class="TableRowHeader">
    <td style="WIDTH: 253px" width="248">
    <asp:label id="lblNameHeader" runat="server">Template Name</asp:label>
    </td>
    <td>
    <asp:label id="lblDescriptionHeader"
    runat="server">Description</asp:label>
    </td>
    </tr>
    </table>
    <!-- End of datagrid Header -->
    </pre>

    Here I would like to make the both columns resizable... How can I do this?

    Thanks,

    Yama
     
    Yama, Nov 9, 2004
    #1
    1. Advertisements

  2. Yama

    Dan Bass Guest

    Yama,

    Resizable to what? If to the size of the browser window, add a table width
    attribute that's relative (say "90%"), and make the first td width relative
    too ("40%")

    <table class="TableHeader" id="tblHeader" border="1" runat="server">
    <tr class="TableRowHeader" width="90%">
    <td width="40%">
    <asp:label id="lblNameHeader" runat="server">Template Name</asp:label>
    </td>
    <td>
    <asp:label id="lblDescriptionHeader"
    runat="server">Description</asp:label>
    </td>
    </tr>
    </table>


    If you want the table to resize to the contents, then remove all "width"
    attributes...

    <table class="TableHeader" id="tblHeader" border="1" runat="server">
    <tr class="TableRowHeader">
    <td>
    <asp:label id="lblNameHeader" runat="server">Template Name</asp:label>
    </td>
    <td>
    <asp:label id="lblDescriptionHeader"
    runat="server">Description</asp:label>
    </td>
    </tr>
    </table>


    Dan.
     
    Dan Bass, Nov 9, 2004
    #2
    1. Advertisements

  3. Yama

    Yama Guest

    Yama, Nov 9, 2004
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.