I'm trying to center a button that i want to place inside a modal. What seems like the right class to add to the button, 'nav-justified', if used takes over the whole width of the navbar and pushes all other elements our except the brand. I was hoping there would be a class solution for this, but maybe i'll just have to override with css. Can anyone help me achieve this please? Here's the relevant bit of my html:
<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/posts">JBK</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<%= link_to 'New post', new_post_path, class: 'btn btn-primary navbar-btn navbar-left' %>
<% if user_signed_in? %>
<%= link_to('Logout', destroy_user_session_path, :method => :delete,
class: 'btn btn-primary navbar-btn navbar-right') %>
<%= link_to('Edit registration', edit_user_registration_path,
class: 'btn btn-primary navbar-btn navbar-right') %>
<% else %>
<%= form_for(User.new, as: :user, url: session_path(:user),
html: { class: 'navbar-form navbar-right' }) do |f| %>
<div class="form-group">
<%= f.email_field :email, placeholder: 'Email',
class: 'form-control' %>
</div>
<div class="form-group">
<%= f.password_field :password, placeholder: 'Password',
class: 'form-control' %>
</div>
<%= f.button "Sign in", class: 'btn btn-success' %>
<% end %>
<% end %>
</div>
</div>
</nav>
<%= yield %>
<div class="container">
<footer>
<p>© Bibble 2015</p>
</footer>
</div>
</body>
Thanks.