G
Guest
I am having a problem with a cell in a table in ASP.NET which used to work OK
in classic ASP. I have one cell in a row where the width should be 22 pixels
and the other cell should take up the remainder of the width available. In
ASP.NET the 2nd cell (when set to 100%) is 500 pixels wide (hence overlapping
the image in row 1), wheras in classic ASP the cell would have a width of
500-22 = 478 pixels (thus filling the remainder of the available space).
How do I do this in ASP.NET (I've tried setting the width to * but it
doesn't take up the remainder of the space)?
Classic ASP:
<table cellpadding="0" cellspacing="0"
style="background-color:#F2F2F2;width: 500px">
<tr><td colspan="2"><img src="/Images/top.gif" width=500 height=4></td></tr>
<tr>
<td width=22><img src="/Images/top.gif" width=22 height=22></td>
<td width:100%>The Cell</td>
</tr>
</table>
ASP.NET:
<table cellpadding="0" cellspacing="0"
style="background-color:#F2F2F2;width: 500px">
<tr><td colspan="2"><asp:Image ID="Image1" runat="server"
ImageUrl="~/Images/top.gif" /></td></tr>
<tr>
<td><asp:Image ID="Image4" runat="server" ImageUrl="~/Images/starbucks.gif"
/></td>
<td style="width:100%">The Cell</td>
</tr>
</table>
in classic ASP. I have one cell in a row where the width should be 22 pixels
and the other cell should take up the remainder of the width available. In
ASP.NET the 2nd cell (when set to 100%) is 500 pixels wide (hence overlapping
the image in row 1), wheras in classic ASP the cell would have a width of
500-22 = 478 pixels (thus filling the remainder of the available space).
How do I do this in ASP.NET (I've tried setting the width to * but it
doesn't take up the remainder of the space)?
Classic ASP:
<table cellpadding="0" cellspacing="0"
style="background-color:#F2F2F2;width: 500px">
<tr><td colspan="2"><img src="/Images/top.gif" width=500 height=4></td></tr>
<tr>
<td width=22><img src="/Images/top.gif" width=22 height=22></td>
<td width:100%>The Cell</td>
</tr>
</table>
ASP.NET:
<table cellpadding="0" cellspacing="0"
style="background-color:#F2F2F2;width: 500px">
<tr><td colspan="2"><asp:Image ID="Image1" runat="server"
ImageUrl="~/Images/top.gif" /></td></tr>
<tr>
<td><asp:Image ID="Image4" runat="server" ImageUrl="~/Images/starbucks.gif"
/></td>
<td style="width:100%">The Cell</td>
</tr>
</table>