Two different submit buttons on the same line
74,999
Solution 1
<div style="width:400px;">
<div style="float: left; width: 130px">
<form id="thisone" action="post_nrs_users.asp" method="post">
<input type="submit" name = "" value="OK" >
</form>
</div>
<div style="float: right; width: 225px">
<form id="thistoo" action="post_nrs_users.asp" method="post">
<input type="submit" name = "" value="Cancel" >
</form>
</div>
</div>
Solution 2
The other way is to change the css properties for the form tags:
form { display: inline; }
Example: http://jsbin.com/omene3/2/edit
Related videos on Youtube
Author by
Ali
Updated on July 09, 2022Comments
-
Ali almost 2 years
I have two submit buttons part of two different forms. They are being displayed on two different lines. Is it possible to have them, side by side on a single line.
<form action="" method="POST"> <input type="submit" name = "" value="OK" > </form> <form action="" method="POST"> <input type="submit" name = "" value="Cancel" > </form>
-
user3553260 over 7 yearsPlease, explain your answer in words.
-
user3553260 over 7 yearsThis is the best and fastest solution for me.
-
user3553260 over 7 yearsset your style up like this
<div style="float: left; padding-left: 50px">
to have control over the position of the buttons.