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 trialKenneth Li
3,298 PointsHow do you keep !content!! from overflowing inside grid items?
<div class="grid"> <div class="item">1</div> <div class="item">2</div> <div class="item">3</div> <div class="item">4</div> <div class="item">5</div> <div class="item">6</div> <h2> fweuihewifniewnfiewijnefiwenfienweifmewifeniwenfeiwnfyuwebweewubweuuwebf7yubwybcyuwbyuwbyufefwfewr</h2> </div>
The h2 goes past into others. i tried setting h2 display:grid. I don't know what im doing honestly.
Ahh it overflows whenever i have max-width? property on css grid. idk
1 Answer
Steven Parker
231,248 PointsYou can use the CSS setting: "overflow: auto;
" to provide a scroll bar instead of allowing the contents to extend beyond the constrained size.