Background picture won't stretch below fixed footer

55 views Asked by At

I recently added a fixed footer to a webpage I'm working on, and for the most part it works great, but on a certain page that has enough text that a scrollbar is included, my background page doesn't stretch below the footer. The problematic page can be found here.

2

There are 2 answers

0
Ajay Narain Mathur On

You have given:

html,body{
    height:100%;
    }

Change it to:

html,body{
min-height:100%;
}
0
clickbait On

Just remove the height: 100% from both the html and body elements. That way the size of the background will stretch all the way down automatically.

You may also want to make the background be at least as tall as the viewport, so put min-height: 100% on html and body elements.