Advertisement

05.20.2004 at 09:30AM PDT, ID: 20996434
[x]
Attachment Details

How to make an input text box width just enough to show one character

Asked by chennarh in Hypertext Markup Language (HTML), Font Creator

Tags: width, input, html, text, box

Try this html code in IE ( i have 6.0):
<HTML>
<style>
.mybox { padding-left: 0px; padding-right: 0px; margin-left: 0px; margin-right: 0px; height: 19px;  }
</style>
<input   type="text" name="text1" value = "W" maxlength = "1" size = "1"    class=mybox >
<input   type="text" name="text2" value = "WWWWW" maxlength = "5" size="5"   class=mybox >
</HTML>

You will notice that the width of the first box is much more than it is needed to show one char.  setting the padding is not helping. Any ideas to reduce the display width??

Start Free Trial
 
Loading Advertisement...
 
[+][-]05.20.2004 at 09:38AM PDT, ID: 11118980

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.20.2004 at 10:13AM PDT, ID: 11119393

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.20.2004 at 10:22AM PDT, ID: 11119502

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.20.2004 at 10:50AM PDT, ID: 11119822

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.20.2004 at 02:54PM PDT, ID: 11122117

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Hypertext Markup Language (HTML), Font Creator
Tags: width, input, html, text, box
Sign Up Now!
Solution Provided By: COBOLdinosaur
Participating Experts: 4
Solution Grade: A
 
 
[+][-]05.20.2004 at 03:01PM PDT, ID: 11122188

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.20.2004 at 03:06PM PDT, ID: 11122221

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.20.2004 at 03:31PM PDT, ID: 11122400

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.20.2004 at 04:14PM PDT, ID: 11122667

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.21.2004 at 06:56AM PDT, ID: 11126685

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.22.2004 at 11:52AM PDT, ID: 11134341

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.24.2005 at 05:34AM PST, ID: 13121186

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32