Solved

How to increase or decrease the height of an input textbox

Posted on 2007-04-07
3
468 Views
Last Modified: 2010-08-05
Excuse me for a dumb question but is there any way to reduce the height of an input text box?

For instance, I would like to have the abiliy to increase or decrease the following line:

<TD><INPUT TYPE="TEXT" SIZE="5" NAME="OpenBal" VALUE=""></TD>

I can increase or decrease the default height

Any ideas?

Thanks in advance
0
Comment
Question by:simflex
3 Comments
 
LVL 4

Expert Comment

by:Cyber-Drugs
ID: 18870525
Hi simflex,

You are after some CSS to achieve what you are after.


Try this:

http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/CSS/Q_21630573.html
0
 
LVL 10

Accepted Solution

by:
js_vaughan earned 50 total points
ID: 18870542
You will need to use CSS.  You can also control the font-size as well using the em standard, or by pixels (px).  If you dont need to alter the font-size just remove that part from the code below.  Depending on your needs, here are 3 ways to impliment it:

This will change the size of ALL your input tags:
<style type="text/css">
<!--
    input{height:24px; font-size:1.2em;}
-->
</style>

Lets say you only want to do one box, and not all of them, replace the style with this:
<style type="text/css">
<!--
    input.largebox{height:24px; font-size:1.2em;}-->
</style>

And then add ...  class="largebox" ... to your input tage.

Those are the best two ways.  If you want "quick and dirty" then you can apply the stlye to the tag itself, like so:
<TD><INPUT TYPE="TEXT" SIZE="5" NAME="OpenBal" VALUE="" STYLE="height:24px; font-size:1.2em;"></TD>
0
 

Author Comment

by:simflex
ID: 18871018
thanks very much
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now