Does anyone know how to align text after an input box? By default it seems to align at the "baseline" I however want it to align in the middle. Can it be done without seprating the text into another table ? Example (note- not complete input description to reduce size):
<td colspan="2">
<div align="left">
<input type="text">
State: <-----add something to valign middle???
<input type="text" ">
Zip Code: <-----add something to valign middle???
<input type="text">
Country: <-----add something to valign middle???
<input type="text" >
</div>
</td>
Anyone?
Thanks,
ScottThis will move the text up 2 pixels. You can do more or less to suit you needs.
<td colspan="2">
<div align="left">
<input type="text"><font style="position:relative; bottom:2;">State:</font>
<input type="text"><font style="position:relative; bottom:2;">Zip Code:</font>
<input type="text"><font style="position:relative; bottom:2;">Country:</font>
<input type="text">
</div>
</td>Thanks!! you are the best!!!!
-ScottSorry, one more thing:
Any idea on how to battle the differences I get between netscape and IE?
Thanks,
ScottOk I think I got it --- this seems to work:
<font style="position:relative;vertical-align: 40%;">State:</font>
Thanks again,
ScottOriginally posted by pyro
This will move the text up 2 pixels.
<input type="text"><font style="position:relative; bottom:2;">State:</font>
<input type="text"><font style="position:relative; bottom:2;">Zip Code:</font>
Um, bottom:2; is incorrect CSS. bottom:2px; however has a chance of working crossbrowser.
Also, why use <font>?
<input type="text"><span style="position:relative; bottom:2px;">Zip Code:</span>
seems like a better option.Originally posted by kscottj
style="position:relative;vertical-align: 40%;">State:
If you are using vertical-align: you have no use for the position:relative part. It's only bloating your code.
<td colspan="2">
<div align="left">
<input type="text">
State: <-----add something to valign middle???
<input type="text" ">
Zip Code: <-----add something to valign middle???
<input type="text">
Country: <-----add something to valign middle???
<input type="text" >
</div>
</td>
Anyone?
Thanks,
ScottThis will move the text up 2 pixels. You can do more or less to suit you needs.
<td colspan="2">
<div align="left">
<input type="text"><font style="position:relative; bottom:2;">State:</font>
<input type="text"><font style="position:relative; bottom:2;">Zip Code:</font>
<input type="text"><font style="position:relative; bottom:2;">Country:</font>
<input type="text">
</div>
</td>Thanks!! you are the best!!!!
-ScottSorry, one more thing:
Any idea on how to battle the differences I get between netscape and IE?
Thanks,
ScottOk I think I got it --- this seems to work:
<font style="position:relative;vertical-align: 40%;">State:</font>
Thanks again,
ScottOriginally posted by pyro
This will move the text up 2 pixels.
<input type="text"><font style="position:relative; bottom:2;">State:</font>
<input type="text"><font style="position:relative; bottom:2;">Zip Code:</font>
Um, bottom:2; is incorrect CSS. bottom:2px; however has a chance of working crossbrowser.
Also, why use <font>?
<input type="text"><span style="position:relative; bottom:2px;">Zip Code:</span>
seems like a better option.Originally posted by kscottj
style="position:relative;vertical-align: 40%;">State:
If you are using vertical-align: you have no use for the position:relative part. It's only bloating your code.