Reputation:
I'm trying to create a topbar using twitter bootstrap, but the black bar won't render. I've got a simple rails app with haml-rails
and less-rails-bootstrap
.
I tried the following haml:
!!! 5
%html
= render 'layouts/header'
%body
.topbar-wrapper
.topbar
.topbar-inner
.container
%a{:href => "brand", :href=>"#"} Name
.container
= yield
I had a look on SO and found the following post: Twitter Bootstrap css topbar html/css I tried translating that HTML into haml, but this doesn't work either:
!!! 5
%html
%body
.topbar
.topbar-inner
.container
%a{:class => "brand", :href =>"#"} Name
I can see the bootstrap styling, so I have included bootstrap and it is being rendered along with the page. I must be making some mistake in my haml.
Upvotes: 1
Views: 2486
Reputation: 601
The HTML scaffold in Bootstrap 2.0 is different from the one proposed in 1.4:
<div class="navbar">
<div class="navbar-inner">
<div class="container">
...
</div>
</div>
</div>
In HAML this would be something like:
.navbar
.navbar-inner
.container
...
You can find more details at: http://twitter.github.com/bootstrap/components.html#navbar
Upvotes: 1