HTML Form. Align text box question

Discussion in 'HTML & Website Design' started by pictureboarduk, Jan 23, 2009.

  1. #1
    Hi,

    I am trying to layout a contact form like in the image below:

    [​IMG]


    My problem is that when I try to widen the email text area, it is effecting the layout of the firstname and lastname boxes above it.



    This is how it currently looks:


    [​IMG]



    And when I alter the width of the email box, it has this effect:


    [​IMG]

    See how the width of the email box pushes out the lastname box?

    I tried placing the email box into a new table, but this made them too far apart in a vertical sense.


    This is my code:

    I'm trying to do this the most simple way possible, just by using code within the FORM tags, but cannot figure it out.

    Could someone tell me how I can align the boxes like it the top picture?

    Many thanks given for any help.

    TY
     
    pictureboarduk, Jan 23, 2009 IP
  2. Corey Bryant

    Corey Bryant Texan at Heart

    Messages:
    1,126
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You are not closing your <td> or anything. You might check out creating a form.

    However, if you need to rely on tables, you might restart with something like:
    <table style="width: 800px">
    	<tr>
    		<td style="width: 50%"><label for="fname">First Name</label><input></td>
    		<td style="width: 50%"><label for="lname">Last Name</label><input></td>
    	</tr>
    	<tr>
    		<td colspan="2"><label for="email">E-Mail Address</label><input></td>
    	</tr>
    </table>
    Code (markup):
     
    Corey Bryant, Jan 23, 2009 IP
    pictureboarduk likes this.