Quantcast
Channel: Active questions tagged flexbox - Stack Overflow
Viewing all articles
Browse latest Browse all 1675

Items-center not working in tailwind nextjs

$
0
0
"use client";import Link from 'next/link';import { usePathname } from 'next/navigation';const Navbar = () => {    const pathname = usePathname();  return (<nav className='min-h-10 h-12 bg-black px-24'><div className='flex justify-around items-center'><h1 className='font-bold text-white text-2xl'>Profile</h1><ul className='flex justify-center items-center text-gray-400 gap-6'><li><Link className={`${pathname === '/' ? 'active' : ''}`} href={'/'}>                        Home</Link></li><li><Link className={`${pathname === '/more' ? 'active' : ''}`} href={'/more'}>                        More</Link></li></ul></div></nav>  )}export default Navbar;

The navbar items are not aligning along y-axis even though i have used items-center. I am not sure why this is happening can anyone help. I am stuck here.


Viewing all articles
Browse latest Browse all 1675

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>