I got a div containing an unordered list and an image.
Currently, the image is bigger, thus increasing the size of the div.
I want the image to have the same height as the unordered list, like this:
How can I do this using HTML/CSS/js?
.container {
display: flex;
}
.list {
list-style-type: none;
}
.picture{
max-width: 100%;
height: auto;
}
<div class="container">
<ul class="list">
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
</ul>
<div>
<img src="https://upload.wikimedia.org/wikipedia/commons/e/ee/Sample_abc.jpg" class="picture" />
</div>
</div>
Example: https://jsfiddle.net/ck26ybg4/