'How do i shrink the flexbox in tailwind?

test picture I have been stumbling a problem with flexbox, how can i shrink the flexbox?

This is the tailwind property that i added

<div class="flex justify-center bg-white rounded"></div>


Solution 1:[1]

You can give the required width to the following div like using w-40 class

Below is the implementation which solves the issue.

<script src="https://cdn.tailwindcss.com"></script>
<div class='container m-10 p-5 bg-blue-800 mx-auto'>
  <div class="flex justify-center bg-white rounded w-40 mx-auto">How to Shrink ?</div>
</div>

I had wrapped them in container class and made bg-blue to make it look esthetic.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Mohit Maroliya B17CS036