PDA

View Full Version : textbox lengths


chelvis
08-21-2002, 04:35 PM
I have a form with a lot of text boxes. Most of them are like below

<table>
<tr>
<td valign="top"><input type="text" name="fname" size="24"></td><td valign="top"><input type="text" size="24" name="lname"></td>
</tr>
</table>

The problem I have is when I view these in different browsers in PC and Mac, they are so different and some times a disaster. For example in most of the IE the look shorter in length than they look in NN. Also in mac, they look much different than the PC IE and NN. Because of this I am having aligning problem to make the page look nice. I tried using cascading style sheet also to control the font for the text box. But no luck. How can I over come this problem?

:confused:

Have1abanana
08-21-2002, 06:47 PM
I suppose what you need to do is to set the table to be an exact amount of pixels from the left.
Try:
<table style="position:absolute; left:*0*; top:*410*; height="100%" valign=top>
<tr>
<td valign="top"><input type="text" name="fname" size="24"></td><td valign="top"><input type="text" size="24" name="lname"></td>
</tr>
</table>

** swap amount to the pixels you'd like
Does that help at all?

PauletteB
08-23-2002, 03:44 AM
input {
font-weight: 500;
font-size: 12px;
font-family: Courier,monospace;
}


.ffnt {
font-weight: 500;
font-size: 12px;
font-family: Courier,monospace;
background: #ffffff;
}

<input type="text" size="20" name="nmBox" value="anything" class="ffnt">


Though I've never used Have1abanana's method, an alternative which works great for me is listed above. The courier font doesn't look bad at all in a form, and is way easier to read than arial. Depending on your setup, that is, if the form is within a table, you may need to be redundant, or avoid having a td style in your css.

The form will become exactly the same size in NN and IE (don't know about Mac) without having to resort to styling sizes. Hope this works for you...