Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

Why is there a massive amount of white space below my footer on mobile version?

Hello guys,

This site I'm working on can be found here: http://7df.22a.myftpupload.com/

If you look at it through a mobile device or make your browser window 'hot-dog-style' below the footer at the very bottom there is a massive amount of white space and I can't seem to figure out why or where that is coming from. Any ideas? Thanks!

3 Answers

Here is the solution, change height to max-height.

@media (max-width: 1024px)
body, html {
/* height: 100%!important; */
overflow: auto!important;
max-height: 100% !important;
}

Hi Christian,

I tried your method but that didn't change anything. It's only on mobile that it does this so max-width of 480px or so. I tried it within a media query of 480px as well and nothing changed.

If i change it on the Browser with Chrome DEV-Tools it works like a charm.

Can't test it on Mobile.

Try to set only one overflow:auto, you got it on html & body.

Christian,

Thanks for your help. Is there anyway you could send me a screenshot just so I can be sure we are talking about the same thing? Thanks!

overflow:visible

Damn, I must be doing something wrong cause it still isn't working on my end. Once you hit that 1024px screen size that footer just drops and that white space is there. .. hmmmm...

Cause you didn't change the height: 100% to max-height:100% on the screensize 1024px ;)

Yes! Christian! You're the man!!!

thanks man it worked

Well, the footer by default has margins and padding's add by the browser, you could try to setting the top padding and margin to zero and that might make it smaller.

footer {
     margin-top: 0px;
     padding-top: 0px;
}

Hope this helps!

Hi all, I have the same issue, I have a big space under my footer when I m on a mobile version . I tried your solution, but it doesn't work for me Please could you help me please?` http://teamtreehouse.com/workspaces/2163462#