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 trialGary Insley
14,133 PointsChallenge Task 5 - Add a overflow property.... Code not working!
Add a overflow property that automatically adds scroll functionality when and where needed.
This is the code i have used:
.main { box-sizing: border-box; max-height: 150px; overflow: scroll; }
I cannot see what is wrong with this.... can someone please help.
Thanks
3 Answers
Jason Anello
Courses Plus Student 94,610 PointsHi Gary,
overflow: scroll;
always puts up a scrollbar even if one is not needed.
overflow: auto;
only adds a scrollbar if it is needed.
Mohamed Mokhtar
9,651 Pointsif you check the preview you will find out that you are not doing anything wrong scroll appears just fine , but it is weird the you can't pass the challenge .. i just tried it and im getting the same result might be something wrong with the challenge it self .... im gonna play around there for a while hopefully i will find out why it is doing this ... mean while try doing it in another browser
Gary Insley
14,133 PointsYeah i saw the previous so was really confused to what was wrong! Have tried with both Chrome and Safari but still having the same problem.
Thanks Mohamed for letting me know that its not anything that i'm doing.