My SCSS isn't working correctly. It should center the links of the navbar component I'm trying to make and not the logo. The css doesn't center them both. image
The following code is my css (SCSS):
.navbar {
background-color: black;
display: flex;
align-items: center;
padding: 1rem;
}
.name {
font-family: "Marcellus", sans-serif;
font-size: 2rem;
}
.center {
display: flex;
align-items: center;
justify-content: center;
}
.links {
display: flex;
list-style: none;
margin: 0;
padding: 0;
.item {
margin-left: 1rem;
}
.link {
color: white;
text-decoration: none;
&:hover {
text-decoration: underline;
}
}
}
The following is my html code (Astro):
---
import './Navbar.scss'
export interface Props {
links: {
title: string;
href: string;
}[]
}
const { links } = Astro.props;
---
<nav class="navbar">
<div class="name">
<a class="text-gradient" href="/">MysticalLira</a>
</div>
<div class="center">
<ul class="links">
{links.map(link => (
<li class="item">
<a class="link" href={link.href}>{link.title}</a>
</li>
))}
</ul>
</div>
</nav>
Did I do something wrong?