I'm trying to display an image and next to it a text. My problem is that this text should be aligned with the bottom of the image, but only appears aligned to the top. I've tried a lot of codes and I ended up getting this one that also does not work:
<div class="row" >
<div style="max-width:150px; float:left">
<img class="img-thumbnail" src=data:image.jpg alt="" />
</div>
<div style="display:table-cell; vertical-align:middle; border:1px solid; height:inherit;"><h4>Alguem de Teste</h4></div>
</div>
Does anyone know how to do this?
EDIT:
Renantriedtofollowthismodelthatcommented:
How to vertically center the contents of a element?
It almost worked, but there are some differences that I could not customize. First I do not know the size of the parent div (container) it will have the height of the image inside it which may vary slightly. And unlike the example I have 2 contents that should stand side by side and I do not know how to reconcile this with the "position: absolute;" used in the example.