0
Guys, I have a header that position: Sticky is not working and I don’t understand why.
HTML
<header class="header_bg">
<div class="container">
<div class="header">
<div class="logo">
<a href="#">UNEARTH</a>
</div>
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">About Us</a></li>
<li><a href="#">Press</a></li>
<li><a href="#">Blog</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
</div>
</header>
CSS
.header {
background-color: white;
padding: 40px 0;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
width: 100%;
position: sticky;
top: 0;}
Can anyone explain to me? Thanks in advance.