Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old February 10th, 2006, 04:12 AM
downunder downunder is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 35 downunder User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 3 m 4 sec
Reputation Power: 2
HTML input size changes with font

I have a couple of input boxes that I would like to display.

The problem is that the size ie the length of these boxes changes with the font size.

Code:
<FORM Action=blabla.php>
<TABLE>
<TR>
 <TD><INPUT   SIZE='75' type=text name='input1'  value='this is the description for test2'></TD>
</TR>
<TR>
 <TD><INPUT  style='font-family: Arial; font-size:14.0pt  ' SIZE='75' type=text name='input1'  value='this is the description for test2'></TD>
</TR>
</TABLE>
</FORM>


Now both the input boxes are 75 characters long but the second one is longer, ie takes up more space on the computer screen.

The question is, How do I make them the same physical length on the computer screen. Is there a different attribute rather than size that I should use?



Reply With Quote
  #2  
Old February 13th, 2006, 10:26 PM
Doik's Avatar
Doik Doik is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: ger
Posts: 337 Doik User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 44 m 13 sec
Reputation Power: 2
Send a message via ICQ to Doik
RE: HTML input size changes with font

if you haven't solved the problem up2now:
use css: include in the <head> part of your document:
Code:
<style type="text/css>
<!--
.textinput{width: 100px;}
-->
</style>

and add a "class="textinput" attribute to both of the input fields.
change the width value how you like.

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > HTML input size changes with font


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway