JavaScript and client side scripting.
Moderator: General Moderators
crzyman
Forum Newbie
Posts: 18 Joined: Fri Sep 16, 2005 10:44 pm
Post
by crzyman » Fri Sep 30, 2005 5:14 pm
Everything works, but the submit buttons won't line up. Please help.
Code: Select all
<br><br>
<table align="center">
<tr>
<td>
<form action="register.php" method="post">
<b>Artist/Bandname: </b> <input type="text" size="20" maxlength="20" name="bandname"
<?php if (isset($_POST['bandname'])) { ?> value="<?php echo $_POST['bandname']; ?>" <?php } ?>/><br />
<b>Username:</b> <input type="text" size="20" maxlength="20" name="username"
<?php if (isset($_POST['username'])) { ?> value="<?php echo $_POST['username']; ?>" <?php } ?>/><br />
<b>Password: </b> <input type="password" size="20" maxlength="10" name="password" /><br />
<b>Confirm Password:</b> <input type="password" size="20" maxlength="10" name="confirmpass" /><br />
<br>
<table align="center">
<tr>
<td>
<P align = "left">
<input type="submit" name="submit" value="Register!" />
</form>
</P>
</td>
<td>
<FORM METHOD="POST" ACTION="/login_form.inc.php">
<P align = "center">
<input type="Submit" name="Submit" value="Login">
</P>
</form>
</td>
</tr>
</table>
</td>
</table
mickd
Forum Contributor
Posts: 397 Joined: Tue Jun 21, 2005 9:05 am
Location: Australia
Post
by mickd » Fri Sep 30, 2005 10:06 pm
didnt really get some stuff like you have a form by itself with only a login submit button but i just rewrote it using a different basic stucture, might want to modify the actual forms abit.
save it as a html documen and open it in explorer to see the basic shape.
Code: Select all
<table align="left"><form action="register.php" method="post">
<tr>
<td>
<b>Artist/Bandname: </b>
</td>
<td><input type="text" size="20" maxlength="20" name="bandname"
<?php if (isset($_POST['bandname'])) { ?> value="<?php echo $_POST['bandname']; ?>" <?php } ?>/><br />
</td>
</tr>
<tr>
<td>
<b>Username:</b>
</td>
<td>
<input type="text" size="20" maxlength="20" name="username"
<?php if (isset($_POST['username'])) { ?> value="<?php echo $_POST['username']; ?>" <?php } ?>/><br />
</td>
</tr>
<tr>
<td>
<b>Password: </b>
</td>
<td>
<input type="password" size="20" maxlength="10" name="password" /><br />
</td>
</tr>
<tr>
<td>
<b>Confirm Password:</b>
</td>
<td>
<input type="password" size="20" maxlength="10" name="confirmpass" /><br />
</td>
</tr>
<tr>
<td>
<input type="submit" name="submit" value="Register!" /></form>
</td>
<td><FORM METHOD="POST" ACTION="/login_form.inc.php">
<input type="Submit" name="Submit" value="Login">
</td>
</tr>
</table></form>
btw for the php why dont you just do:
Code: Select all
<?php if(isset($_POST['username'])) { echo 'value="' . $_POST['username'] . '"'; } ?>
pilau
Forum Regular
Posts: 594 Joined: Sat Jul 09, 2005 10:22 am
Location: Israel
Post
by pilau » Sat Oct 01, 2005 5:26 am
I have NO idea why, or how - but it's the "<FORM METHOD="POST" ACTION="/login_form.inc.php">" line that is making this hell of a weird thingy occur.
foobar
Forum Regular
Posts: 613 Joined: Wed Sep 28, 2005 10:08 am
Post
by foobar » Sat Oct 01, 2005 7:56 am
pilau wrote: I have NO idea why, or how - but it's the "<FORM METHOD="POST" ACTION="/login_form.inc.php">" line that is making this hell of a weird thingy occur.
Try setting the form margins and padding to 0:
Code: Select all
<style type="text/css">
form { margin: 0px; padding: 0px; }
</style>
ambivalent
Forum Contributor
Posts: 173 Joined: Thu Apr 14, 2005 8:58 pm
Location: Toronto, ON
Post
by ambivalent » Sat Oct 01, 2005 2:35 pm
Code: Select all
<style type="text/css">
form { margin: 0px; padding: 0px; }
</style>
Excellent. I was having an issue where two submit buttons in a table insisted on staying at the tops of the cells, despite all my efforts to the contrary...the above was the solution, TY.
pilau
Forum Regular
Posts: 594 Joined: Sat Jul 09, 2005 10:22 am
Location: Israel
Post
by pilau » Sun Oct 02, 2005 8:18 am
foobar wrote: Try setting the form margins and padding to 0:
Code: Select all
<style type="text/css">
form { margin: 0px; padding: 0px; }
</style>
Woah woah - since when do forms have margins?
Anyway, I tried it on my system and it worked. So here's a solution for you crzyman
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Sun Oct 02, 2005 8:20 am
forms have always had margins.