<div id="grid">
<div id="toolbar">
<div>
Some writing.
</div>
<img src="some-link" alt="">
</div>
<div id="main">Main view</div>
</div>
#grid {
display:grid;
grid-template-columns: auto 1fr;
}
#toolbar {
display:flex;
flex-direction:column;
}
Is it possible to force the image to take only as much as width as the text does?
I've got a toolbar with icons that I'd like to have an image on the bottom. The icons decide the width of the toolbar (which resides inside an auto cell of a grid), and I'd like the image to fit exactly that width.