How to Align Buttons in Twitter Bootstrap 3.3

You can nest the buttons inside a div tag as shown below:

<div>
  <div>
    <%= link_to 'Watch Video', episode, class: 'btn btn-primary', rel: 'nofollow' %>  
    <% unless episode.article_id.blank? %>
      <%= link_to 'Read Article', article_url(id: episode.article.to_param), class: 'btn btn-success', rel: 'nofollow' %>  
    <% end %>
  </div>                                  
</div>    

This took me about 30 minutes to figure. I hope it helps someone.


Related Articles


Ace the Technical Interview

  • Easily find the gaps in your knowledge
  • Get customized lessons based on where you are
  • Take consistent action everyday
  • Builtin accountability to keep you on track
  • You will solve bigger problems over time
  • Get the job of your dreams

Take the 30 Day Coding Skills Challenge

Gain confidence to attend the interview

No spam ever. Unsubscribe anytime.