Tailwind mobile device hidden is not working

Viewed 6708

I am trying to hide a div in mobile device, but I am not able to do that, this is my code below

<div class="absolute top-0 inset-x-0 p-2 transition transform origin-top-right sm:hidden">
                <p>asdasd</p>
            </div>

How to do this in tailwind

2 Answers

Tailwind is mobile first, sm is 576px and above (640px in v1), if you want to make it hidden below md, it should be just <div class="hidden md:block">

Can you try:

<div class="hidden sm:block">
  <p>asdasd</p>
</div>

Or sm:flex if you want it to be flex.

Related