Textbox Width issue

sj1187534

Centurion
Joined
Jun 10, 2003
Messages
108
Location
Dallas, Houston, etc.etc.
Hi...I have small question on the textbox control. How do we assign the width of the textbox to be the width of the table cell it is in. I thought "width=100%" takes care of it.

<td width="100"><asp:textbox id="some" width="100%"></asp:textbox></td>

But this is not giving what I want. What I understood from the results is the textbox width is such that the whole string that i am loading into it is occupied. Trying to explain it in a different way:

In the example above, even though the width of the table cell is 100px, if the string to be loaded into the textbox is 150px, the textbox is automatically expanding to 150px!!!

I hope u understood what the problem is!! Is there any way to get around this??

Thanks
SJ
 
Code:
<html>
	<head>
		<title>Test</title>
	</head>
	<body>
		<table style="width: 100%;">
			<tr>
				<td style="width: 100%;"><form><input type="text" style="width: 100%;" /></form></td>
			</tr>
		</table>
	</body>
</html>
 
Back
Top