I want the result to be like this
but this is what i get
with my svelte code:
<div
style="background-image: url('{unsplash?.url}');"
class="bg-black flex items-center justify-center min-h-screen bg-cover"
>
<Authenticate />
<!-- here is my div -->
<div class="block flex absolute bottom-9 left-5 h-16 w-16">
<img src={unsplash?.author.avatar} alt={unsplash?.author.username} class="rounded-full" />
<p class="inline-block text-blank ml-2">
By <a class="inline-block" target="__blank" href={unsplash?.author.url}
>{unsplash?.author.username}</a
>
</p>
<p class="inline-block text-black">
Find similar pictures on <a class="inline-block" target="__blank" href="http://unsplash.com"
>Unsplash</a
>
</p>
</div>
</div>
i used inline-block, but doesn't work
inline-block
has nothing to do with internal wrapping, though it enforces a box around the content. For an explanation whatinline-block
is about see this question. To prevent wrapping you need to setwhite-space: nowrap
or similar; don't know what the respective Tailwind class for that is... – Semblanceinline-block
on thep
elements, that puts the elements in text flow mode,p
should stack on top of each other by default (they are block elements). – Semblance