Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto Wrap on Input Field

Status
Not open for further replies.

ronnyjljr

IS-IT--Management
Nov 23, 2003
249
0
0
US
Hello,

If I have an input field as such:

Code:
 <input class="myClass" type="text" name="test">

and CSS class:
Code:
   .myClass{
width: 200px;
}

Is there any way with CSS, to have the text auto-wrap when text hits the right hand side? Rather than auto scrolling to the right, pushing the text on the screen to the left.

Also, it is possible to have it as a single line and then auto expand vertically downward? Without JS is preferred, but it may be impossible :)

~R




typedef map<GiantX,gold, less<std::shortestpathtogold> > AwesomeMap;
 
Other than textarea, I don't even think any html form controls that you can write in allow more than one line of input. So, the answer to your question would be no.

If you use textarea, you could use javascript to expand the textarea to fit all the text in and textarea by default wraps text.

___________________________________________________________
[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
I figured as much.


Thanks,
~Ron

typedef map<GiantX,gold, less<std::shortestpathtogold> > AwesomeMap;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top