Home > other >  How can I align image horizontally in tailwind-css in Laravel breeze
How can I align image horizontally in tailwind-css in Laravel breeze

Time:12-07

I'm trying to align one omg with text, but the tag <p> break the line. I want to do something like this enter image description here But my code just do this enter image description here , soo that's my code:

       <div class="mb-10 mx-auto w-full max-w-sm fixed top-4 left-6 inline-block">
          <div >
            <a href="">
              <img src="../Assets/Img/logo.svg" class="h-10 w-10" alt="">
              <div class="space-y-2 text-left">
                <p class="font-bold text-purple-700 text-2xl">Vuexy</p>
              </div>
            </a>
          </div>
        </div>

CodePudding user response:

You could apply the flex utility class to your a element.

<div class="mb-10 mx-auto w-full max-w-sm fixed top-4 left-6 inline-block">
  <a href="" class="flex">
    <img src="../Assets/Img/logo.svg" class="h-10 w-10 mr-4" alt="">
    <p class="font-bold text-purple-700 text-2xl">Vuexy</p>
  </a>
</div>
  • Related