Solved

How to increase or decrease the height of an input textbox

Posted on 2007-04-07
3
470 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

This article discusses four methods for overlaying images in a container on a web page
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.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

777 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