DEV Community

M. T. H. Titumir
M. T. H. Titumir

Posted on

Centering a div inside his sibling div using tailwind css.

<div class="relative">
<div>
<img src="your-image.jpg" alt="Your Image">
</div>
<div class="absolute inset-0 flex items-center justify-center">
<!-- Contents of the second div -->
</div>
</div>

Top comments (0)