Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get two forms to display inline

Tags:

html

css

This doesnt work

<form style ='display:inline;'>
 <input type = 'submit'/>
</form>
<form style ='display:inline;'>
  <input type = 'submit'/>
</form>

I want two forms that submit to different scripts and each have an input button to display inline.

I want to style it inline as someone else will make more permanent changes to the main CSS file what am I doing wrong?

like image 275
algorithmicCoder Avatar asked Sep 15 '11 23:09

algorithmicCoder


1 Answers

I think what you want is to display them side by side. You can do it using floats instead like so:

<form style ='float: left; padding: 5px;'>
akjfhdkjahj<br />
 <input type = 'submit'/>
</form>
<form style ='float: left; padding: 5px;'>
  aklfjas<br />
  <input type = 'submit'/>
</form>

But even that's not ideal. What would be best is to wrap each < form > in < div >s and use float in the div tag instead.

like image 62
checkenginelight Avatar answered Oct 18 '22 04:10

checkenginelight