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 trialDaniel Barreto
Courses Plus Student 14,978 PointsRandom white space to the right
Hey I'm quite frustrated with this maybe someone can help me out, I'm building a site and for some reason i have this unexplained white space all the way to the left. When i load the page, its not there; however, the horizontal scroll bar is appearing and when you scroll to the end there is this white space. This is also only affecting the body content. The header and footer extend the full way. I'm attaching a link to a screenshot. Hopefully someone has encountered this before.
11 Answers
Helen Carr
526 PointsIs there any chance you could provide me with your code with markdown? If you cannot post your code, then here are some possible reasons:
The Background Image has a white space
Your padding is incorrectly configured
Your float is incorrectly configured
Your sizes are incorrectly configured
As I have said, I cannot help any further without your source code.
Daniel Barreto
Courses Plus Student 14,978 Pointsdo you have an email i can send you a dropbox link? Not too comfortable having the code in public but dont mind you tinkering with it.
Helen Carr
526 PointsYeah sure. alexcarr3000@gmail.com. Don't really care about that email going public.
Helen Carr
526 PointsJust wondering, what have you set the class name to for your background?
Daniel Barreto
Courses Plus Student 14,978 Pointsso basically before the main body content, i have two empty divs. the first ones background img is attached to .blacklogo and the black page w/ white logo is #whitelogo
Helen Carr
526 PointsThanks.
Helen Carr
526 PointsI think I'm nearly there. I found the source of it, but I'm still working on figuring out how you can disable it.
Helen Carr
526 PointsOkay, so basically, if you look at your Contact page, and scroll right the box is larger. The only possible explanation is that something from another page is being loaded after the black background, therefore becoming part of the foreground. For example
<p class="test1">This is a test</p>
<br>
<br>
<p class="big-white-box">Self explanatory</p>
The box (your problem) is being loaded after the test writing (background), therefore, not going behind it, but in front of it. There's not much more I can do, but I'll keep the files and keep looking through. Tell me if you figure it out, and I'll tell you if I figure it out.
Daniel Barreto
Courses Plus Student 14,978 Pointsokay thanks i'll tinker around.
Helen Carr
526 PointsNo problem. As I say, I'll keep searching too.
Daniel Barreto
Courses Plus Student 14,978 PointsSo, not the solution I was hoping for but it worked for me nonetheless,
I ended up doing this:
html,
body {
overflow-x: hidden;
}
Helen Carr
526 PointsYeah, that seems about right because it was basically a box overflowing.