FancyPrairie
Programmer
I plan on creating a composite control. To simulate how the composite control would work when resizing it in the designer, I created a table within a DIV tag. The table consists of 3 rows.
The first row contains a label.
The second row contains a text box.
The third row contains a list box.
I want both the width and height of the table to be 100%. That is, it fits within the DIV tag (taking into effect the margins around the table). I can't seem to get the 3rd row to work properly. I can't get the list box to be the same size as the row.
Note that as I resize the DIV tag, the table should grow and shrink accordingly.
I just realized I may be posting this in the wrong forum since I'm attempting to do this in Visual Studio 2005. However, I would think the table structure would be the same.
Here's my code:
The first row contains a label.
The second row contains a text box.
The third row contains a list box.
I want both the width and height of the table to be 100%. That is, it fits within the DIV tag (taking into effect the margins around the table). I can't seem to get the 3rd row to work properly. I can't get the list box to be the same size as the row.
Note that as I resize the DIV tag, the table should grow and shrink accordingly.
I just realized I may be posting this in the wrong forum since I'm attempting to do this in Visual Studio 2005. However, I would think the table structure would be the same.
Here's my code:
Code:
<div style="position: absolute; overflow: hidden; top: 15px; width: 427px; left: 80px; height: 561px; border-right: red 1px solid; border-top: red 1px solid; border-left: red 1px solid; border-bottom: red 1px solid;">
<table style="margin-left: 1%; margin-right: 1%; height: 100%" cellpadding='0' cellspacing='0' border='0' width='98%'>
<tr><td>
<asp:Label ID="Label1" runat="server" Style="width: 100%;" Text="Label" ></asp:Label>
</td></tr>
<tr><td style="width: 100%">
<asp:TextBox ID="TextBox1" runat="server" Style="width: 100%" ></asp:TextBox>
</td></tr>
<tr><td style="height: 88%">
<asp:ListBox ID="ListBox1" runat="server" Style="position: fixed; top: 0; width: 100%; height: 100%"></asp:ListBox>
</td></tr>
</table>
</div>