Jefferson Jefferson - 3 years ago 113
CSS Question

Adding space between two buttons

I am using haml.erb file. I would like to add space between two buttons in UI. Now the two buttons are appearing one after one without space. How can i do?

= link_to :back, :class => "btn btn-success", :href => '/pt_setup' do
%i.icon-arrow-left.icon-white
Back   // does not workout
=link_to "New Subscription", { :controller => "pt_app", :action => "new_subn"}, :class => 'btn btn-success'

Answer Source

you can add margin left on second button. you can add class on second button e.g

 =link_to "New Subscription", { :controller => "pt_app", :action => "new_subn"}, :class => 'btn btn-success left-margin'

and then you can add css in your haml file

:css
  .left-margin { margin-left: 2px }

Or you can add inline css to one of these buttons.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download