I have a div
with the class of "container" and I need to adjust the height
of this container based on the dimensions of the image
it contains.
Here is the HTML structure:
<figure class="container">
<a class = "123">
<img class="item" src="...">
</a>
</figure>
And here is the CSS code:
.container {
position: relative;
min-width: 100%;
margin: 0 -10px 10px
}
.item {
width: 100%;
border-radius: 3px
}
Any suggestions on how I can achieve this?