I am using Twitter Bootstrap with a fixed navbar, so I have the following HAML & CSS:
HAML
%html
%body
%header
.navbar
...
#main-wrapper
.container
%footer
CSS
body {
padding-top: 60px
height: 100%;
}
The issue is that this create a body 60px larger than the page height, so I always have a scroll bar on the pages, even when it’s not needed to display the content. I NEED the 60px of padding though in order for the responsive behavior to work correctly.
Is there any way to keep this padding and still achieve a body height of exactly 100%?
You can try something like this:
Let the enclosing div have a height of 100%, and add some internal element to create the padding.