[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 514
  • Last Modified:

Making small text boxes

I'm new to web development in general so I may be missing something simple.  I'm trying to create small text boxes, but if I do

<INPUT type="text" NAME="textbox" MAXLENGTH=5 SIZE=1>

it's about twice as long as I need it to be.  Is there a way to make it smaller by maybe setting the size by pixels or a percentage of the screen?
0
iwtblj247
Asked:
iwtblj247
1 Solution
 
alexpercsiCommented:
You need to add a bit of css to that. You need to define width, height and font-size:
Play around with the code below:
<INPUT type="text" NAME="textbox" MAXLENGTH=5 SIZE=1 style="width:30px;height:12px;font-size:10px;">

Open in new window

0
 
iwtblj247Author Commented:
Worked great.  Thanks
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now