Forum Moderators: open

Message Too Old, No Replies

Need Help with submit button

         

Gian04

5:47 am on Jun 17, 2007 (gmt 0)

10+ Year Member



<form action=mypage.php?a=previous10
...
<INPUT type="submit" name="submit_button" value="Previous10">
</form>
<form action=mypage.php?a=next10
...
<INPUT type="submit" name="submit_button" value="Next10">
</form>

The code above is intended to show two buttons aligned horizontally

[Previous10] [Next10]

But instead it displays 2 buttons vertically even though i dont have any <BR>

[Previous10]

[Next10]

How can I make it aligned horizontally? Thanks

[edited by: Gian04 at 5:49 am (utc) on June 17, 2007]

Habtom

6:15 am on Jun 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>>How can I make it aligned horizontally? Thanks

How about just using a table:

<table>
<tr><td><form action="mypage.php?a=previous10">
<INPUT type="submit" name="submit_button" value="Previous10">
</form> </td><td><form action="mypage.php?a=next10">
<INPUT type="submit" name="submit_button" value="Next10">
</form>
</td>
</table>

Habtom

dreamcatcher

12:50 pm on Jun 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You appear to be missing brackets for your form action. Is that the reason?

<form action=mypage.php?a=next10>

dc

barns101

8:34 pm on Jun 17, 2007 (gmt 0)

10+ Year Member



HTML form elements naturally have a margin around them and so to get two forms on the same line you'll have to use a table (like Habtom said) or CSS:


<form style="display: inline;">