herioppaokulloh
New Member
Got a form table below which contains form elements such as text inputs and validation messages:\[code\]$error_user = (!empty($errors['user']))?$errors['user']:"";$error_email = (!empty($errors['email']))?$errors['email']:""; echo "<form action='./forgotpass.php' method='post'> <table> <tr> <td></td> <td id='errormsg'>$errormsg</td> </tr> <tr> <td>Username</td> <td><input type='text' name='user' value='http://stackoverflow.com/questions/13820419/$user'/><br/>".$error_user."</td> </tr> <tr> <td>Email</td> <td><input type='text' name='email' value='http://stackoverflow.com/questions/13820419/$email'/><br/>".$error_email."</td> </tr> <tr> <td></td> <td><input type='submit' name='resetbtn' value='http://stackoverflow.com/questions/13820419/Reset Password' /></td> </tr> </table> </form>";\[/code\]Now I am displaying each validation message below the relevant text inputs but the problem is the allignment. If I display the message underneath the text input as I am doing now, then the text input moves up a little bit to occupy the space below for the validation message, meaning the text input is not leveled with its label e.g \[code\]Email\[/code\] text input not aligned with this label when validation appears.My question is that how can I get the label and text inputs to stay align with each other when the validation message appears underneath