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 trialJake Adam
9,226 PointsHelp with this code challenge please
a { display: inline-block; width: 100px; }
.main { box-sizing: border-box; max-height: 150px; overflow: scroll; }
What is wrong with the overflow declaration?
4 Answers
Guy Noda-Bailey
18,837 PointsTry setting it to auto instead;
.main {
box-sizing: border-box;
max-height: 150px;
overflow: auto;
}
kevin jordan
11,353 PointsHey Jake -
This is a trick question kinda. Although the question in the challenge asks you to use overflow:scroll; it also asks you to set it up to be used ONLY if necessary. In cases like this you need to use the alternative overflow:auto; which will only add the scrolls IF needed.
Hope this helps !
Christian De Leon
11,304 PointsYea I believe kevin Jordan & Guy Noda-Bailey are correct!
.main {
box-sizing: border-box;
max-height: 150px;
overflow: auto;
}
Jake Adam
9,226 PointsThanks so much guys!