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 trialBrandon Brigham
3,716 PointsWhy 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
Christian Frick
14,586 PointsHere is the solution, change height to max-height.
@media (max-width: 1024px)
body, html {
/* height: 100%!important; */
overflow: auto!important;
max-height: 100% !important;
}
Devin Scheu
66,191 PointsWell, 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!
tunis dehas
4,863 PointsHi 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#
Brandon Brigham
3,716 PointsBrandon Brigham
3,716 PointsHi 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.
Christian Frick
14,586 PointsChristian Frick
14,586 PointsIf 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.
Brandon Brigham
3,716 PointsBrandon Brigham
3,716 PointsChristian,
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!
Christian Frick
14,586 PointsChristian Frick
14,586 PointsBrandon Brigham
3,716 PointsBrandon Brigham
3,716 PointsDamn, 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...
Christian Frick
14,586 PointsChristian Frick
14,586 PointsCause you didn't change the height: 100% to max-height:100% on the screensize 1024px ;)
Brandon Brigham
3,716 PointsBrandon Brigham
3,716 PointsYes! Christian! You're the man!!!
edgar robledo
6,067 Pointsedgar robledo
6,067 Pointsthanks man it worked