Formatting Button Position with Form_For

Posted by Tian on Stack Overflow See other posts from Stack Overflow or by Tian
Published on 2010-06-13T18:43:00Z Indexed on 2010/06/13 19:02 UTC
Read the original article Hit count: 150

Filed under:
|
|

I am using form_for to create a form that has 1 input field and 1 button. I'd like the submit button to be beside the input field rather than underneath it.

Relevant code is:

.input{border: 1px solid #666666; width:400px; height:22px;font-size:16px;}

<td width="900" height="50" align="left" valign="middle">
    <% form_for @contact, :url => {:action => "create"}, :html => {:class => "input"} do |f| %>
        <%= f.text_field :email, :size=> 74 %>
        <%= image_submit_tag '2009-12-06-Landing1.gif' %>   
    <% end %>
</td>

© Stack Overflow or respective owner

Related posts about html

Related posts about ruby-on-rails