Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
how to align this HTML form?
hi
Im trying to edit this so the fields will appear beneath each other, i have tried using a <br> tag after the </td> tag but it doesnt seem to work, if anyone could help me here i would be very grateful.
here is my code:
<?php
?>
<html>
<head>
<style type="text/css">
a:link {color:blue;text-decoration:none;}
a:visited {color:red;text-decoration:none;}
a:hover {color:orange;text-decoration:underline;}
</style>
</head>
<form action='register.php'>
<table>
<tr>
<td>
First Name
</td>
<td>
<input type='text' name='first name'>
</td><br>
<td>
Surname
</td>
<td>
<input type='text' name='surname'>
</td><br>
<td>
Desired Username:
</td>
<td>
<input type='text' name='username'>
</td><br>
<td>
Choose a password:
</td>
<td>
<input type='password' name='password'>
</td>
<br>
<td>
Confirm password:
</td>
<td>
<input type='password' name='confirm passowrd'>
</td>
<br>
</tr>
</table>
</form>
</html>
Link to the form i currently see: http://www.techempirestest.net16.net/register.php
Also i was wondering of anyone knew the code for adding the Captcha verification tool?
Thanks in advance.
I do know this is missing a submit button, i will add this in later... also, this is meant to be a php script.
2 Answers
- UnclePLv 41 decade agoFavorite Answer
You got your tr's and td's mixed (you missed off the body tag too but that's not so important). Captcha is a bit more involved, there's lots more code stuff, and getting it to work is harder too, you'll have to search for that one, but I fixed your form...
<html>
<head>
<style type="text/css">
a:link {color:blue;text-decoration:none;}
a:visited {color:red;text-decoration:none;}
a:hover {color:orange;text-decoration:underline;…
</style>
</head>
<body>
<form action='register.php'>
<table>
<td>
<tr>
First Name
</tr>
<tr>
<input type='text' name='first name'>
</td><br>
<tr>
Surname
</tr>
<tr>
<input type='text' name='surname'>
</tr><br>
<tr>
Desired Username:
</tr>
<tr>
<input type='text' name='username'>
</tr><br>
<tr>
Choose a password:
</tr>
<tr>
<input type='password' name='password'>
</tr>
<br>
<tr>
Confirm password:
</tr>
<tr>
<input type='password' name='confirm passowrd'>
</tr>
<br>
</td>
</table>
</form>
</body>
</html>
Plus if it does need to be php just rename the page (and links to it) to .php from .html. It doesn't need to have php code if it doesn't need php function though.
<?php means "start php code" and ?> means "end php code" but you have nothing in between, no code, so can be omitted (unless there is something there you've not put here).
- no1home2dayLv 71 decade ago
In your css, try using the align property ("align:left" or "align:center", etc.) and see if that doesn't resolve what you're trying to do (no guarantees here, just a suggestion - *GRIN*)
Good luck with your project, and "happy programming" :-)