I have a Bootstrap layout with a sidebar on the right that accompanies the scroll, within div[role=main]
.
My layout:
Mycode:
<headerclass="container">
<div class="row">
<div class="col-sm-12">Header</div>
</div>
</header>
<div role="main" class="container">
<div class="row">
<div class="col-sm-8 col-lg-9">
Main Content
</div>
<aside class="col-sm-4 col-lg-3">
<section class="budget-summary">
<h2 class="text-center">Resumo</h2>
</section>
</aside>
</div>
</div>
<footer>
<div class="row">
<div class="col-sm-12">Footer</div>
</div>
</footer>
$('.budget-summary').affix({
offset: {
top: 0,
bottom: function () {
return (this.bottom = $('footer#page-footer').outerHeight(true));
}
}
});
however the contents of the sidebar is dynamic (grows and shrinks). which sometimes causes the contents of the sidebar not to be shown in full, as the following figure shows:
Is there a way around this?