Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display Multiple Form Submit Buttons Inline Same Line In IE8 In Table

Tags:

html

css

format

I am trying to display two form submit buttons on the same line inside a table. In IE7 the following code works great, however in IE8 the Delete button drops down to the next line even though I declared the form to display inline. Any suggestions?

I created a basic test page here to show the issue: http://ajondeck.net/test/displayinline.html

like image 998
aherrick Avatar asked Aug 12 '09 14:08

aherrick


2 Answers

Try the following because I had a situation where I made that work without tables and stuff.

//Put this in ur css styling area
.spanFormat
{
  text-align: left;
  display: table-cell;
  min-width: 10px;
  padding-right: 10px;
}

//This is the html that is used to make ur input buttons side by side on two    
//different forms.
<span class="spanFormat">
 <form action="someaction.php" method="post">
  <input type="submit" name="action1" value="somevalue" />
  <input type="hidden" name="param" value="somevalue" />
 </form>
</span>
<span class="spanFormat">
 <form action="someaction2.php" method="post">
  <input type="submit" name="action3" value="somevalue" />
  <input type="hidden" name="param1" value="somevalue" />
 </form>
</span>

That seemed to put both of my buttons on two different forms side by side.

like image 183
Ramon Avatar answered Oct 05 '22 11:10

Ramon


The easiest way I find is to use a little inline CSS (you could list it as a class in your stylesheet as well if you'd like) in the form tag, like so:

<form method="post" action="nextPage.html" name="nameForm" style="display:inline;">
<input type="hidden" name="value" value="someValue">
<input type="submit" name="submit" value="Submit">
</form>
like image 37
CFDub Avatar answered Oct 05 '22 13:10

CFDub