Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

aligning text input boxes 2

Status
Not open for further replies.

sql99

Programmer
Nov 12, 2003
83
US
Hello,

I have a few text input boxes that I would like to left align so that it looks cleaner. Below is what I currently have and it's centered instead of left align because everything else is centered. Can you please help? I would like the Name: and Telephone: to be moved over to the center and the text input boxes to align with one another...

<div align="center">

<font color="ffffff">*</font>Name: &nbsp;&nbsp;
<input type="text" size="25" name="empid"><br><br>

<font color="ffffff">*</font>Telephone: &nbsp;&nbsp;
<input type="text" size="25" name="lastname"><br><br>

Thanks in advance,
sql99
 
1. Use a table with border="0" or style="border: none;".
2. Put the fields in a div with style="float: right;" and line up the text.

I'm sure there are many other ways.

--Chessbot

"See the TURTLE of enormous girth!"
-- Stephen King, The Dark Tower series
 
Another way:

Code:
<form name="the_form">
<fieldset style="text-align: left; border: none;">
*Name:<input type="text" size="25" name="empid" style="margin-left: 5px;">
<br />
*Telephone:<input type="text" size="25" name="lastname" style="margin-left: 5px;">
<br />
</fieldset>
</form>

*cLFlaVA
----------------------------
Lois: "Peter, you're drunk!"
Peter: "I'm not drunk, I'm just exhausted from stayin' up all night drinking!
 
Thanks for your fast response. They both worked like a charm...thanks again for your help...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top