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 Foundations The Box Model Width, Height and Overflow Properties

Stephen Clarke-Keating
Stephen Clarke-Keating
1,626 Points

Oveflow property not being accepted by Code Challenge

I'm doing the code challenge for Width, Height & Overflow properties. The last part asks me to include an overflow property that adds scroll bars. I've put it inside the div element as follows;

div { overflow: scroll; }

But the code challenge is telling me to check the overflow declaration. However if I preview the code, the scroll bars appear as expected, if I also do this myself in a browser with the project files, the code also works as expected.

I can't continue properly now as I can't complete the challenge.

3 Answers

Trevor Wood
Trevor Wood
17,828 Points

hmm, that's odd. Try

div { overflow: auto; }

Stéphane Angeles
Stéphane Angeles
3,117 Points

Yes, Stephen Clarke-Keating . Try with "overflow: auto;", which does the same thing. If I remember well, the question says that it has to scroll only when "it's needed", so auto fits perfectly.

Stephen Clarke-Keating
Stephen Clarke-Keating
1,626 Points

Ah yes, of course! I really should stop when I get tired, these little things go into my head then leave straight away!

Thanks guys!