View Single Post
Old 02-21-2005, 10:13 AM   #8 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,470
sde is on a distinguished road
here is a format i like to use for tables with the key name on the left of the input box.
HTML Code:
<form method="POST" action="mypage.php">
<table border="0" cellspacing="1" cellpadding="2">
<!-- example of 1 item of data per row -->
<tr>
  <td align="right">Email</td>
  <td><input type="text" name="email" size="35"></td>
</tr>
<!-- exmple of more than 1 item per row -->
<tr>
  <td align="right">First Name</td>
  <td><input type="text" name="first_name"> &nbsp; 
  Last Name <input type="text" name="last_name"></td>
</tr>
<!-- submit -->
<tr>
  <td align="right">&nbsp;</td>
  <td align="right"><input type="submit" name="btn_submit" value="Submit"></td>
</tr>
</table>
</form>
I know I could do a colspan on the submit line, but IE tends to make all cells the same width if you use a colspan.

here's another one with keynames on top of input boxes.
HTML Code:
<form method="POST" action="mypage.php">
<table border="0" cellspacing="1" cellpadding="2">
<!-- example of 1 item of data per row -->
<tr>
  <td>Email<br><input type="text" name="email" size="35"></td>
</tr>
<!-- exmple of more than 1 item per row -->
<tr>
  <td>
  
  <table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>First Name<br><input type="text" name="first_name"> &nbsp;</td>
    <td>Last Name<br><input type="text" name="last_name"></td>
  </tr>
  </table>
  
  </td>
</tr>
<!-- submit -->
<tr>
  <td align="right"><input type="submit" name="btn_submit" value="Submit"></td>
</tr>
</table>
</form>
i know it has nothing to do with your question since it is nested tables, but just thought i'd share
__________________
Mike
sde is offline   Reply With Quote