As a newcomer to CSS grid, I am struggling to understand how to prevent components from overflowing a grid. The section in question, with the class name of profile-widget-wrapper
, is defined with grid-row:2/4
but is overflowing the grid. Can anyone provide guidance on how to fix this issue? Any assistance is greatly appreciated as I continue to learn about CSS Grid. Thank you.
https://i.sstatic.net/NAysk.png
.wrapper{ //main wrapper
display:grid;
grid-template-columns: 1fr 2fr 2fr;
grid-template-rows: 100px 300px 100px;
}
.profile-widget-wrapper{ //section that is overflowing
grid-row:2/4;
}
<div class="wrapper">
<section class="profile-widget-wrapper">
<div class="profile-widget">
<h5 class="title">PROFILE WIDGET</h5>
<ul class="widget-optns">
<li class="active">
<h5>PROFILE OVERVIEW</h5>
</li>
<li class="count">
<h5>FRIENDS</h5>
<span class="friend-count">383</span>
</li>
<li class="count">
<h5>GAMES OWNED</h5>
<span class="games-owned-count">10</span>
</li>
<li>
<h5>STEAM QUICK LINKS</i></h5>
</li>
</ul>
</div>
</section>
</div>