After integrating Bootstrap Sass into a Rails project, I embarked on revamping its homepage. However, I encountered an issue with the background style applied to the <body>
element - it only affected the portion of the page visible upon initial loading. As the page extended downwards to reveal additional elements within the same <body>
tag, I encompassed everything in a
<div class="clearit"> .......</div>
. In my CSS attempts, initially employing the overflow:auto
property failed to yield the desired outcome. Subsequently, I experimented with:
.clearit {
zoom: 1.0;
clear: both;
}
.clearit:after
{
zoom: 1.0;
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
overflow: auto;
}
Despite these efforts, the browser seemed to interpret the <body>
as merely covering the initial visible 100% of the page, rather than extending all the way down to the bottom of the scrollbar. Despite scouring online resources and attempting various strategies over multiple days, I have yet to find a solution that works. Any insights or suggestions would be greatly appreciated.