0
我有一個導航欄在引導,我試圖居中一些鏈接,並有另一個鏈接拉到頁面的右側。我添加了navbar-right
類,但它似乎沒有任何效果。Bootstrap導航欄中心鏈接和右對齊其他
nav.navbar.navbar-default.navbar-fixed-top
.container
.navbar-header
button.navbar-toggle[type="button" data-toggle="collapse" data-target=".navbar-collapse"]
span.sr-only Toggle navigation
span.icon-bar
span.icon-bar
span.icon-bar
= link_to root_path,class: 'navbar-brand' do
.img-responsive
=image_tag "logowhite2.png"
.collapse.navbar-collapse
# this part should be centered
ul.nav.navbar-nav
li#fat-menu.dropdown.text-center
a.dropdown-toggle data-toggle="dropdown" href="#"
| Users
b.caret
ul.dropdown-menu
li = link_to 'Clients', clients_path
li = link_to 'Trainers', trainers_path
li = link_to 'Admins', admins_path
li = link_to 'Companies', companies_path
li = link_to 'Bookings', bookings_path
li = link_to 'New Booking', book_user_path
li = link_to 'Courses', courses_path
# this part should pull to the right
- if user_signed_in?
ul.nav.navbar-nav.navbar-right
li#fat-menu.dropdown
a.dropdown-toggle data-toggle="dropdown" href="#"
=current_user.name.capitalize
b.caret
ul.dropdown-menu
li = link_to 'Sign out', destroy_user_session_path, :method=>'delete'
- else
li = link_to 'Sign in', new_user_session_path
我在做什麼錯在這裏?
如何將其他鏈接置於導航欄中間? –