Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Displaying 2 Form Buttons next to each other in hidden div

Tags:

html

css

I'm looking to have 2 buttons for forms that do 2 different actions when clicked shown next to each other

This is best explained on the following link:

http://jsfiddle.net/pfeHA/1/

The code involved is:

<div id="question" style="display:none; margin:0px;">
<form action="DoAction1" method="get">
<input type="submit"  value="Action1">
</form>
<form method="post" action="DoAction2">
<INPUT TYPE="submit" value="Action2">
</form>
</div>

This causes the buttons to display under each other, as shown by the link: http://jsfiddle.net/pfeHA/1/

Any help appreciated, thanks!

like image 500
mobile Avatar asked Oct 20 '25 17:10

mobile


1 Answers

add this in your CSS -

form{ display: inline-block; }

Working Fiddle

like image 168
Dipak Avatar answered Oct 23 '25 06:10

Dipak