Dubbeldam Posted October 30, 2010 Share Posted October 30, 2010 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 More sharing options...
thescientist Posted October 30, 2010 Share Posted October 30, 2010 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 More sharing options...
Dubbeldam Posted October 30, 2010 Author Share Posted October 30, 2010 Ah the TD thing helped me lol!Thanks man appreciate it Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.