PDA

View Full Version : ASP Textbox width



keno2113
27 Mar 2008, 10:41 AM
Is there a way to make an asp:textbox automatically expand it's width with the value it contains? I have a sentence on a form that pulls one part from a SQL table. The string from the SQL table can contain from 5 to 35 Characters. The problem is, the sentence is centered in the form and if I set the textbox width to 35 (so that the longest string will be visible when selected) it makes the sentence appear pushed to the left when a shorter string is selected. I have tried no width value and width:auto; neither of which work.