I'm new to Bootstrap, and I'm trying to use it with Symfony2. I already have a main topbar sticky which is used for navigation. My problem is when I try to add a similar footer which is sticky at the bottom, but it overlaps my content. I'm using a JQuery script to avoid the problem for the top navbar, like this:
$(document).ready(function(){
$(document.body).css('padding-top', $('#topnavbar').height());
$(window).resize(function(){
$(document.body).css('padding-top', $('#topnavbar').height());
});
});
The structure of my main Twig layout is like this:
<div class="navbar navbar-default navbar-fixed-top" id="topnavbar">
<div class="container-fluid">
</div>
</div>
{% block body %}
{% endblock %}
<footer class="footer navbar-fixed-bottom">
</footer>
My CSS is original. I tried with margin bottom
or padding bottom
but the overlapping of my content (in the {% block body %}) is always present, and I don't know what to do to fix it. Does anyone have an idea?