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 trialMarcelo Retana
2,534 PointsAdding scrollbar on css challenge
The challenge ask to add an overflow: scroll; I did it already but the page shows up a message as if my code isn't the proper one.
This is my code:
nav a {
display: inline-block;
width: 100px;
}
.main {
box-sizing: border-box;
max-height: 150px;
overflow: scroll;
}
3 Answers
2btrzt9ior
15,232 PointsHi Marcelo,
I believe this is the challenge prompt you are referring to:
Finally, add an overflow property that automatically provides scrollbars if and where they are needed.
The important parts are 'automatically' and 'if and where they are needed.'
overflow:scroll forces scroll bars whether they are needed or not!
You should be able to figure it out from here, but let me know if you need more help!
Marcelo Retana
2,534 PointsGuil Hernandez help!
Rachit Agarwal
6,235 Pointsoverflow: auto;
worked for me!