Looking to create a responsive design similar to the one in this https://i.sstatic.net/8NvkQ.png Where the image maintains its width on smaller screens, while allowing the text to fill up the remaining space and reach 100% of the parent container.
I've attempted the following code but it's not producing the desired outcome.
<div class="comment">
<div class="image"><img>Image here</img></div>
<div class="text">Contents</div>
</div>
.comment {
width: 100%;
}
.image {
width: 50px;
float: left;
}
.text {
float: left;
}
While I'm open to using jQuery for a solution, my preference is for a CSS-only approach. Any assistance would be greatly appreciated! :)