Something is wrong with the sidebar not standing its ground compared to the pill content. The result of this code is basically the <aside>
gets shoved in the upper left corner next to the pill tabs while the pill content is spread all beneath it and anchored at the left. I've tried quite a few CSS tricks (margins, widths, etc.) but nothing seems to snap it to center the content (which are microposts).
Relevant CSS:
.nav-pills > .active > a,
.nav-pills > .active > a:hover,.nav-pills > li > a:hover {
float:none;
display:inline-block;
*display:inline;
zoom:1;
text-decoration: none;
font-weight: bold;
border-radius:0px;
border-bottom-width: 4px;
border-bottom-style: solid;
border-bottom-color: #000000;
color: #000 !important;
background-color: transparent !important;
}
.nav-pills {
border-radius:0px;
text-align: center;
}
Relevant ERB:
<% provide(:title, @user.name) %>
<div class="row">
<aside class="col-md-4">
<section class="user_info">
<h1>
<%= gravatar_for @user %>
<%= @user.name %>
</h1>
<% if @user.admin? %>
<span class="label label-warning">Administrator</span>
<% end %>
<br>
<br>
<br>
<br>
<div style="color:grey">
<% if current_user.admin? %>
<%= @user.email %>
<% end %>
<br>
<%= @user.activated_at.strftime("Joined: %m/%d/%Y") %>
</div>
</section>
</aside>
<div class="col-md-8">
<ul class="nav nav-pills">
<li class="active">
<a data-toggle="pill" href="#microposts">Posts (<%= @user.microposts.count %>)</a>
</li>
<li>
<a data-toggle="pill" href="#events">Events (Insert count here)</a>
</li>
</ul>
</div>
</div>
<div class="tab-content">
<div id="microposts" class="tab-pane fade in active">
<% if @user.microposts.any? %>
<ol class="microposts">
<%= render @microposts %>
</ol>
<%= will_paginate @microposts %>
<% else %>
No posts yet. Create one on the sidebar.
<% end %>
</div>
<div id="events" class="tab-pane fade">
<p>Events brah</p>
</div>
</div>