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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Comfort Ajala](https://uploads.teamtreehouse.com/production/profile-photos/2384242/micro_NewImage.jpg)
Comfort Ajala
4,301 Pointsoverflow
doesnt work for me? I type in .main{ overflow:scroll;} still does not work.
<!DOCTYPE html>
<html>
<head>
<title>Width, Height and Overflow Properties</title>
<link rel="stylesheet" href="page.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<nav>
<a href="#">About Me</a>
<a href="#">My Work</a>
<a href="#">Contact Me</a>
</nav>
<div class="main">
<p>Veggies sunt bona vobis, proinde vos postulo esse magis kohlrabi courgette sorrel rock melon summer purslane soybean bitterleaf fennel.</p>
<p>Pumpkin ricebean gourd cauliflower water chestnut garlic parsley bunya nuts earthnut pea tomato lettuce. Swiss chard chickpea burdock soybean soko cucumber garlic wakame pea arugula azuki bean turnip greens spinach eggplant.</p>
<p>Arugula cress bitterleaf rutabaga potato burdock celery chard eggplant desert raisin.</p>
</div>
</body>
</html>
/* Complete the challenge by writing CSS below */
nav a{display:inline-block;width:100px;}
.main {box-sizing:border-box;max-height:150px; overflow: scroll;
}
1 Answer
![Ben Dietrich](https://uploads.teamtreehouse.com/production/profile-photos/1166872/micro_bd-profile-crop.jpg)
Ben Dietrich
8,287 PointsComfort,
Your code is correct in that you are allowing the overflow to scroll however the challenge is looking for something slightly different. The challenge states, "Finally, add an overflow property that automatically provides scrollbars if and where they are needed."
Since the challenge requests scrollbars only if and where they are needed you'll need to use the overflow value auto instead of scroll. It should look like this...
.main {
box-sizing: border-box;
overflow: auto;
max-height: 150px;
}
I hope that helps!
Comfort Ajala
4,301 PointsComfort Ajala
4,301 PointsTHANKKSS
Comfort Ajala
4,301 PointsComfort Ajala
4,301 PointsTHANKKSS
Ben Dietrich
8,287 PointsBen Dietrich
8,287 PointsYou're welcome. If you can, please up-vote the correct answer(s) to close the question and to improve the quality of the forum. Thanks!!