Closing the gap between text and the text field

Discussion in 'HTML & Website Design' started by chrisj, Aug 14, 2007.

  1. #1
    I'm trying to modify an existing sign-up form.

    When I view this form, the text words, for example "UserName" or "Password"
    are too far to the left from the text field box. How can I move the text closer to the it's corresponding field text box?

    Here is a truncated version of the form, to help you help me, if you would please. thanks.

    <form method="POST" action="index.php">
    <tr>
    	  <td width="140" rowspan="21" id="menu">&nbsp;</td>
        <td>&nbsp;</td></tr>
    	
    	<input class='field' type='hidden' name='command' value='account'>
    	<input class='field' type='hidden' name='param' value='signup'>
    	<tr>
    	  <td class='pageTitle'><span class="hLine"> <font face="Arial" color=#000000" size="2" Style="padding: 1px;">&nbsp;Create New Account</span></td>
    	  <td class='pageTitle'>&nbsp;</td>
    	</tr>
    	
    	<tr>
    	  <td class='fieldLabel' width="30%"><font face="Arial" color=#000000" size="2" Style="padding: 1px;">&nbsp;Membership Type</td>
    		<td align="center">[account_type_panel]</td></tr>
    	
    	<tr>
    	  <td class='fieldLabel' width="30%"> <font face="Arial" color=#000000" size="2" Style="padding: 1px;">&nbsp;User Name</td>
    		<td><input class='field' type='text' size='40' maxlength="30" name='user_name' value='<?=$account->user_name ?>'>
    			<span class='requiredField'>&nbsp;*&nbsp;</span><br> Your files <span class='errorMessage'><?=$account->get_error('user_name') ?></span></td>tr>
        <td>&nbsp;  </td></tr>
    	<tr>
    	  <td class='fieldLabel'><font face="Arial" color=#000000" size="2" Style="padding: 1px;">&nbsp;Password</td>
    		<td><input class='field' type='password' size='30' maxlength="30" name='password' value='<?=$account->password ?>'>
    			<span class='requiredField'>&nbsp;*&nbsp;</span><span class='errorMessage'><?=$account->get_error('password') ?></span></td>
    	</tr>
    
    	</tr>
    	</form>
    
    Code (markup):
     
    chrisj, Aug 14, 2007 IP
  2. bpb2221

    bpb2221 Peon

    Messages:
    83
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Align Right...?
     
    bpb2221, Aug 14, 2007 IP
  3. chrisj

    chrisj Well-Known Member

    Messages:
    606
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #3
    Thanks fo ryour reply.

    Did that. No change.

    Any other thoughts, please?
     
    chrisj, Aug 14, 2007 IP
  4. Corey Bryant

    Corey Bryant Texan at Heart

    Messages:
    1,126
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Is the the correct code? There are a lot of problems with the code itself which might be causing you the other problems. For example, you have
    </span></td>tr>
    Code (markup):
    and
    color=#000000"
    Code (markup):
    You might consider re-doing the tables first or using something like Form Layout Example
     
    Corey Bryant, Aug 14, 2007 IP
  5. chrisj

    chrisj Well-Known Member

    Messages:
    606
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #5
    Thanks for your reply.

    I appreciate that you pointed out the
    </span></td>tr>
    Code (markup):
    , but I don't see it in my web page. Must have happened when I copied it over.

    So, there really aren't "a lot" of problems with the code itself. I appreciate that you took the time to look at it. I really don't want to create a whole new Form, just want to move the text closer to the fields.

    Thought this question might be an easy one for somebody.

    Any suggestions to move the text closer to the fields, will be appreciated.

    Thanks.
     
    chrisj, Aug 14, 2007 IP
  6. bpb2221

    bpb2221 Peon

    Messages:
    83
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    You could add padding-left instead of padding all the way around like you are currently doing.
    Something like padding-left="20px"
     
    bpb2221, Aug 14, 2007 IP
  7. chrisj

    chrisj Well-Known Member

    Messages:
    606
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #7
    Thanks that helped.

    You can see what it looks like if you go to the another thread titled:
    "How to have left column next to right area"

    Where I just need to make the Form area to the right of the left hand column.

    thanks
     
    chrisj, Aug 14, 2007 IP