|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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? |
|
#2
|
||||
|
||||
|
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. |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > HTML input size changes with font |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|