|
-
May 27th, 2012, 12:06 AM
#1
[RESOLVED] Multiline TextBox fill entire container
I have a table where I have a cell that spans all of the rows and it contains a Multiline TextBox, what I would like is that textbox to fill the entire cell regardless of how big it is.
I tried this:
Code:
<td rowspan="14"><asp:TextBox ID="AppInfoTextBox" TextMode="MultiLine" style="width:100%;height:100%;" runat="server" /></td>
Here's how it's rendering:

I don't know at coding time what the size will be, the page is opened in a popup window and the user can re-size the window so I need it to be whatever the cell size is.
-
May 27th, 2012, 10:48 PM
#2
Re: Multiline TextBox fill entire container
Hi.Your problem is that td will not give percentage out.If you use pixels you will see that it expands.
What i think you can do is, since your are using rowspan, try to set the exact same rowspan of the td to the textbox rows like this:
Code:
<table cellpadding="0" cellspacing="0" style="width:100%;height:100%;background:#ccc;">
<tr>
<td>sdfsfdfdsfsd<br />
sfd<br />
sdfd<br />
<br />
<br />
sd<br />
</td>
<td rowspan="14"><asp:TextBox ID="AppInfoTextBox" TextMode="MultiLine" Rows="14" style="width:100%" runat="server" /></td>
</tr>
</table>
These are assumptions i haven't actually tested an expanding textbox inside a td.Let me know how this turns out.
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Jun 15th, 2012, 08:33 AM
#3
Re: [RESOLVED] Multiline TextBox fill entire container
Thanks man, it's close enough I guess.
It just seems odd that you can set a width of 100%, but don't bother with the css height property because the multiline textbox ignores it. I don't see why you can't have a TB resize itself with it's container.
-
Jun 15th, 2012, 07:43 PM
#4
Re: [RESOLVED] Multiline TextBox fill entire container
Well. me either.May exist a better solution but i don't have one
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|