<body>
<h1>Which element is causing the scrollbar to appear?</h1>
<div class="container1">
<div class="container2">
<div class="container3">
<div class="container4">
<div class="container5">
<ul>
<li>List Item 1</li>
<li>List Item 2</li>
<li>List Item 3</li>
<li>List Item 4</li>
<li>List Item 5</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</body>
div:nth-of-type(1) {
background: lightcyan;
}
.container1,
.container2,
.container5 {
height: 250px;
}
.container3 {
overflow: auto;
}
.container4 {
overflow: visible;
}
ul {
padding: 0;
}
li {
height: 30px;
padding: 10px;
margin: 5px 0;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.