Factory:

The problem of stretching the text field

I have the following code

<table cellpadding="2" cellspacing="2">
  <tr>
    <td>Factory:</td>
    <td>
      <asp:TextBox ID="txtFactory" runat="server" Width="100%"></asp:TextBox>
    </td>
  </tr>
</table>

My problem is that sometimes the factory text field can contain a rather long description of 100 or more characters, and when this happens, my text file expands off-screen, which leads to the appearance of a horizontal scroll bar at the bottom of my browser, and I really do I do not want. I want my TextBox to expand to the width that the browser window is in, and can also resize when the user resizes his browser window.

+3
source share
4 answers

javascript, jQuery . , body. .

+1

Jagd,

Wrap MaxLength.

W3Schools WebControls.

(HTTP)..//www.w3schools ()//control_textbox ()
--- , ---

,

-

+1

HTML FF Firebug , .

If your text is too long and has no spaces, the browser does not know where to place the line break, this behavior can be changed using the attribute in TD or TextBox (which is displayed as SPAN once in the browser). WRAP

+1
source

Where is your shortcut for the form element? Why do you use tables for layout? Why do you specify the width for textarea in HTML and not in your CSS file?

Please do it right!

+1
source

Source: https://habr.com/ru/post/1708774/


All Articles