Jump to content

I want the dropdown box to appear right of the text, not topleft of the site!


Dubbeldam

Recommended Posts

Under this post is the code I use.As you can see, the user can select his birthday month by a dropdown box. Problem is, the dropdown box does not appear to the right of the month, but in the topleft of the screen. How can I make it appear to the right of Month?

<form id="loginForm" name="loginForm" method="post" action="register-exec.php">  <table width="300" border="0" align="center" cellpadding="2" cellspacing="0">	<tr>	  <th>First Name </th>	  <td><input name="fname" type="text" class="textfield" id="fname" /></td>	</tr>	<tr>	  <th>Last Name </th>	  <td><input name="lname" type="text" class="textfield" id="lname" /></td>	</tr>	<tr>	  <th width="124">Login</th>	  <td width="168"><input name="login" type="text" class="textfield" id="login" /></td>	</tr>	<tr>	  <th width="124">Birthday year</th><br>	  <td width="168"><input name="Birthday" type="text" onkeydown="return ( event.ctrlKey || event.altKey 					|| (47<event.keyCode && event.keyCode<58 && event.shiftKey==false) 					|| (95<event.keyCode && event.keyCode<106)					|| (event.keyCode==8) || (event.keyCode==9) 					|| (event.keyCode>34 && event.keyCode<40) 					|| (event.keyCode==46) )" class="textfield" id="login" /></td>	</tr>		<tr>	  <th width="124">Birthday month</th><br>		<form action="">		<select name="Month">		<option value="Jan">Jan</option>		<option value="Feb">Feb</option>		<option value="Mar">Mar</option>		<option value="Apr">Apr</option>		</select>		</form></tr>	<tr>	  <th>Password</th>	  <td><input name="password" type="password" class="textfield" id="password" /></td>	</tr>	<tr>	  <th>Confirm Password </th>	  <td><input name="cpassword" type="password" class="textfield" id="cpassword" /></td>	</tr>	<tr>	  <td> </td>	  <td><input type="submit" name="Submit" value="Register" /></td>	</tr>  </table></form>

Link to comment
Share on other sites

you should validate you code, I'm guess certain tags aren't nested correctly. I don't think you should be using a brand new set of <form> tags just for the dropdown, and I think the dropdown should be in <td> tags as well. These structural errors, especially when using tables, could lead to unpredictable results. The validator will alert you of any such issues.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...