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 CSS Layout Basics Getting Started with CSS Layout Creating a Sticky Footer

why i m getting scroll bar ?

4 Answers

Guil used

p:last-child {
  margin-bottom: 0;
}

to remove the extra bottom margin between the wrap div and the footer that caused this problem. He never mentioned it in the video, but that is the difference between opening the new workspace and continuing with the one from the previous lesson. This is related to the collapsing margins we covered earlier.

Why does he selects a paragraph element?

Owa Aquino
Owa Aquino
19,277 Points

Try changing the value of your media max-width. Maybe it's just your screen resolutions that's why your seeing a scroll bar. Because in my screen it's working fine.

Lindsey Somerset
Lindsey Somerset
10,592 Points

I had this same problem. If you inspect the footer element on your page through the Chrome Dev tools, its value is actually 89.3333px instead of 89px. Change that value and it should get rid of the scroll bar. Let me know if that helps...

Jeremiah Shore
Jeremiah Shore
31,168 Points

I can't exactly answer this, but I addressed the same topic in another similar post. Please check that out if you have a few minutes.