I'm trying to float a sidebar nav as a partial in my rails app. Here is the relevant part of my application layout:
<body>
<%= render 'layouts/header' %>
<% flash.each do |name, msg| %>
<%= content_tag :div, msg, :id => "flash_#{name}" %>
<% end %>
<%= render 'layouts/sidebar' %>
<div class="container">
<%= yield %>
<%= render 'layouts/footer' %>
</div>
</body>
I'm using Twitter bootstrap in this app, fyi. I expected this to render above <% yield %>, but I can't figure out how to render the sidebar floating next to yield. How can I do this? I have not applied any custom css to the sidebar yet. I have applied class of "sidebar-nav-fixed" to the div containing the sidebar content. Thanks in advance!
Please have a look at http://twitter.github.io/bootstrap/scaffolding.html#fluidGridSystem. May be something like this would work:
<body>
<%= render 'layouts/header' %>
<% flash.each do |name, msg| %>
<%= content_tag :div, msg, :id => "flash_#{name}" %>
<% end %>
<div class="container">
<div class="row-fluid">
<div class="span4"><%= render 'layouts/sidebar' %></div>
<div class="span8"><%= yield %></div>
</div>
<%= render 'layouts/footer' %>
</div>
</body>