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

Controlling input box height 1

Status
Not open for further replies.

AlanArons

Programmer
Aug 1, 2002
91
US
Is there any way to control the Height of an <input> form field besides <textarea>?

Alan Arons [ponder]
 
You mean the dimensions of the text box or the number of lines it can show?


For dimensions you could use CSS.

.mytextbox{
height:20px;
}

However, increasing the size of a text box does not let it show more lines, if you want multi line input only the textarea can do that.


----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Actually, I want to make it smaller. I would prefer to not use CSS. I was hoping for something like
<input type="text" name="somename" size="26" height??????>

Alan Arons [ponder]
 
You could use inline CSS if what you want is to not have to create a separate style sheet.

Code:
<input type="text" name="somename" size="26" [red]style="[/red][blue]height:10px;[/blue][red]"[/red]>

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Or ger REALLY fancy :)

Code:
<input type="text" name="somename" style="height:15px; width:200px; font-weight: bold; font-size: 10px; font-family: Verdana, Arial, sans-serif; color: red; text-align: center;">

-
Mike
FREE CGI/Perl/JavaScripts
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top