I have just begun learning TailwindCSS and although it was working fine, some classes are not working on an element. Space-x-6 does not work in vscode+browser while everything worked just fine in talwindplay.Here is the image of me trying to apply space-x-6 to navlinks but they are not working as expected.
I tried the same code in TailwindPlay and it works there. Although I must highlight that background of TailwindPlay does not change and neither do the text color in vscode+browser when I try to change navlinks color to something else.
(https://i.sstatic.net/0ystmtCY.jpg)
Here is the code snippet.
console.clear();
<body class="bg-black text-white font-poppins pb-12">
<header class="py-6">
<nav>
<div class="container flex justify-between items-center mx-auto px-8 md:px-14 lg:px-24 w-full">
<div class="text-lg">B</div>
<div class="space-x-6">
<a href="#home">Home</a>
<a href="#work">Work</a>
<a href="#clients">Clients</a>
<a href="#contact"><button>Hire me</button></a>
</div>
</div>
</nav>
</header>
<script src="https://cdn.tailwindcss.com"></script>
</body>
Lazy Coder is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2