The text is not aligned with the photo:
<div class="inline-block">
<img class="relative h-6 w-6 rounded-full bg-gray-50 ring-2 ring-white" src="https://static.generated.photos/vue-static/home/hero/6.png" alt="">
<img class="relative bottom-2 left-4 h-3 w-3 rounded-full bg-gray-50 ring-2 ring-white" src="https://static.generated.photos/vue-static/home/hero/8.png" alt="">
</div>
Some name
https://play.tailwindcss.com/21iaVRA65b
What is wrong?
3
Answers
The second
<img>
tag has moved vertically upwards but its layout box is still at its original place:You could consider using a slightly different layout method with the same visual effect but which moves the layout box:
Edit: to have the image and the text vertically-center-aligned:
You can use display: flex on the parent of inline-block div and text. Here is the example:-
You can add parent with class
flex items-center
to make vertically center items.