Home > Enterprise >  Center-align one element and right align second element- Tailwind CSS
Center-align one element and right align second element- Tailwind CSS

Time:01-24

I have attached a rough idea of what I am trying to achieve, the dotted line represents the center of the container. I am trying to center align one div element, then right align a second div within the same row, while both elements are centered horizontally. enter image description here

CodePudding user response:

Try like this:

<script src="https://cdn.tailwindcss.com"></script>

<div >
  <div ></div>
  <div ></div>
  <div >
    <div ></div>
  </div>
</div>

  •  Tags:  
  • Related