Resize table column

Y

Yama

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
 
D

Dan Bass

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.
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top