I am sort of new to coding but when adding a box-shadow to a navbar, it gives a shadow to the #href links as well. I do not want the words to have a shadow, just the bottom of the navbar.
body {
background-color: grey;
font-family: 'Poppins', sans-serif;
font-size: 1.8rem;
font-weight: 400;
line-height: 1.4;
color: var(--main-white);
}
#nav {
display: flex;
justify-content: flex-end;
z-index: 1;
padding: 10px 25px 10px 10px;
font-size: 35px;
font-family: 'Poppins', sans-serif;
color: #ffa2ae;
box-shadow: 0 2px rgba(0, 0, 0, 0.4);
text-decoration: none;
}
#nav {
background: #81f7ff;
}
*, *::before, *::after {
box-sizing: inherit;
* {
margin: 0;
padding: 0
}
<main>
<section id="nav" name="nav">
<a href="#home" id="nav" name="home-nav">Home</a>
<a href="#purchase" id="nav" name="purchase-nav">Purchase</a>
<a href="#contact" id="nav" name="contact-nav">Contact</a>
</section>
</main>

Looks like this is, because your font/href is in the Navbar Tag if you look at your HTML file and so the Text gets the shadows from your navbar. Try to add the href (or h1 , bzw whatever there is in your HTML file) in your css file and set the shatdows there to 0 or none.