rails css How to place two button in a line -


i'm rails beginner. want make 2 button placed in line.

how can put button correctly on line of table?

two buttons:

<%= button_to "empty cart", @cart, method: :delete %>  <%= submit_tag "delete item" %>         

my view <%= form_tag destroy_multiple_carts_path, method: :delete %>

        <table class="table">             <tbody>                 <tr>                     <td class = "checkbox_size_sm"><input type="checkbox"></td>                     <td class = "image">item</td>                     <td class = "title"> </td>                     <td>price</td>                 </tr>                 <% @cart.line_items.order(created_at: :desc).each |item| %>                  <tr>                     <td><%= check_box_tag "item_ids[]", item.id %></td>                      <td class = "image"><%= image_tag item.product.item, size: "100" %>                     </td>                     <td class = "title" id = "td_align_middle">                         <%= item.product.title %><br>                         <%= item.product.brand %>                     </td>                     <td id = "td_align_middle"><%= item.product.price %></td>                 </tr>                 <% end %>                </tbody>                 <tfoot>                 <tr>                     <td colspan = "4" class="total_price" >                         total price <strong>  <%= @cart.cart_total_price %> </strong>                            </td>                                </tr>                 <tr>                     <td colspan ="4" class="al-r">                     <%= button_to "empty cart", @cart, method: :delete %> <%= submit_tag "delete item" %>                            </td>                 </tr>             </tfoot>         </table>      </div> </div> 

help me..

wrap buttons in div, set div float left , overflow hidden add hose 2 buttons in div class divname , in css file add below style div.divname button { float:left; margin-right:10px; }


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -