I have a setup for the bootstrap template, and my problem is that there is a space between the div and the footer. The white space is caused by the fact that you do not have enough content to fill the entire page, so the body is displayed between the footer and the contents of the div. Is there a way to stretch the botstrap div at the bottom of the page and also make the footer at the very bottom? Perhaps with a flexible box?
Here is the code I'm working with: (trying to stretch the wrapper of a div to the footer)
HTML
<body ng-app="firstApp"> <div ng-view="" class="everything"> <div class="wrapper"> <div class="mid"> <div class="row"> <div class="col-sm-12"> <p>This is in a div that should fill the screen</p> </div> </div> </div> <div class="push"></div> </div> <footer class="footer"> <div class="container"> <p>Hello I'm the footer</p> </div> </footer> </div>
CSS
html { height: 100%; } body { height: 100% !important; font-family: 'Roboto', sans-serif; color: black; background: green; } .footer { text-align: center; padding: 30px 0; height: 4em; background-color: #7ccbc8; width: 100%; }
I read a lot of stackoverflow posts on this topic, but I'm still pretty confused about best practices for this.
source share