-2

I have an input field inside a td that looks like:

enter image description here

the text in the field is:

"this is my text for now but I can't see it all"

As you can see I can only see the start of the text how can I get the rest of the text to display inside the text box without changing the size of the td. So, to maybe space out over 3 or 4 lines?

CSS is as follows at the moment:

height:100px;
width:100% !important;
padding:0px;
overflow:hidden;
Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
John
  • 3,965
  • 21
  • 77
  • 163

2 Answers2

-1

You will probably want to use a textarea rather than input, similar to this question? Multiple lines of input in <input type="text" />

Community
  • 1
  • 1
JohnDevelops
  • 582
  • 3
  • 14
-1

For input inside TD you will have to use textarea unfortunately. See this question/answer also.

white-space:pre is what you want when multi-lining a td without an input though:

td { white-space:pre }

Of course this might not work if your td's width is so big that all the text fits inside without the need to break.

Check this question also.

Community
  • 1
  • 1
trainoasis
  • 6,419
  • 12
  • 51
  • 82