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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.searchbox { question

Status
Not open for further replies.

madHatter1

Technical User
Feb 27, 2003
54
GB
Hello

I use .searchbox { instead of <textarea></textarea> (I think textarea can look bulky), but when the user types in the .searchbox, the characters do not wrap (no scrollbars appear).

Is there a way around that?

Hatter
 
Hello Uxtopia

I use it like this...........

<style>
.searchbox {
border:solid 1px #d38f50;
font-family: verdana,arial,helvetica;
font-size: 8pt;
background-color: black;
COLOR: white;
font-weight: medium;
}

</style>

<body>

<input name=&quot;whatever&quot; value=&quot;whatever&quot; class=&quot;searchbox&quot;>

madHatter

</body>
 
You can't do it like that.
First of all when you use input you need to specify the type, example: <input type=&quot;text&quot; /> or <input type=&quot;password&quot; />
Also, don't expect the text input to scroll, that's what the textarea is for!
use the textarea, it won't look bulky if you just apply some css to it:

<textarea class=&quot;txt&quot; rows=&quot;3&quot; cols=&quot;20&quot;></textarea>

.txt {
border: 1px solid #d38f50;
font-family: verdana,arial,helvetica, sans-serif;
font-size: 8pt;
color: #ffffff;
background: #000000;
scrollbar-base-color: #000000; /* IE ONLY */
}


É ::
 
I second Cian on this one. Text inputs are meant for one liners like names and emails. If you need a larger one with line breaks then you will need to use a textarea. Apply CSS to taste. Gary Haran
 
Hello Cian and Xutopia

Thanks for your posts.

OK, you've convinced me - I've saved your messages - and will try it out.

Thanks again

Hatter
 
Hello Cian and Xutopia

Tried it and............just what I wanted! Just didn't know it could be done that way!

Many thanks - it looks nice.

Hatter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top