Currently, I am utilizing TailwindCSS and daisyUI to construct a dropdown menu. The code for it can be found below.
The issue that I am facing is when a dropdown menu item is selected (activated), it turns purple, despite applying the utility class bg-white
on the <li>
element. Is there a way to customize the color of the dropdown menu items upon click? Ideally, I am looking for a CSS-only solution since I am using the CDN versions of Tailwind and daisyUI and do not have access to modify tailwind.config.js
.
<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="97f3f6fee4eee2fed7a5b9a6a2b9a4">[email protected]</a>/dist/full.css" rel="stylesheet" type="text/css" />
<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="dbafbab2b7acb2b5bfb8a8a89be9f5e9">[email protected]</a>/dist/tailwind.min.css" rel="stylesheet" type="text/css" />
<div class="dropdown dropdown-hover">
<a class="mx-2 text-2xl">ABOUT</a>
<ul class="dropdown-content menu bg-blue-primary items-center">
<li class="bg-white"><a>Item 1</a></li>
<li class="bg-white"><a>Item 2</a></li>
</ul>
</div>