When I run my code on play.tailwindcss.com
, the group hover feature works fine.
However, when I copy the same code into my local file, the group hover doesn't work there.
What do I need to add to my tailwind.config.css
file in order to enable group hover in my case?
Here is the code snippet:
<div class="group">
<a href="#" class=" font-bold text-gray-700 ">Menu</a>
<div class="hidden group-hover:block absolute bg-white shadow-md w-auto p-4">
<a href="#" class="p-2 block font-bold text-gray-700 hover:bg-gray-200">option 1</a>
<a href="#" class="p-2 block font-bold text-gray-700 hover:bg-gray-200">option 1</a>
<a href="#" class="p-2 block font-bold text-gray-700 hover:bg-gray-200">option 1</a>
<a href="#" class="p-2 block font-bold text-gray-700 hover:bg-gray-200">option 1</a>
</div>