Currently working on an ecommerce simulation project for a course, I successfully implemented a featured section with cards. However, when it comes to scrolling, I am facing an issue where the cards overlap with my sticky navbar as I scroll down. If anyone can help me identify a solution or point out what might be causing this problem, I would greatly appreciate it. Below is the code I have been working with.
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Libros leidos</title>
<script src="https://kit.fontawesome.com/87b9d53f02.js"></script>
<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="0e6c61617a7d7a7c6f7e4e3b203c203c">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi" crossorigin="anonymous">
<link rel="stylesheet" href="style.css">
</head>
<body>
<!--navbar-->
<nav class="navbar navbar-expand-lg py-3">
<div class="container">
<img src="img/logo.png" class="logo">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navmenu">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse">
<ul id="navbar" class="navbar-nav ms-auto" >
<li class="nav-item"><a href="index.html" class="nav-link">Home</a></li>
<li class="nav-item"><a href="#shop" class="nav-link">Tienda</a></li>
<li class="nav-item"><a href="#rentals" class="nav-link">Alquiler</a></li>
</ul>
</div>
</div>
</nav>
<!--header-->
<section class="header p-5 text-center text-sm-start">
<div class="container">
<div class="d-sm-flex align-items-center justify-content-between ">
<div>
<h4 class="py-2">Looking for new stories to read?</h4>
<h2>Read a well-loved book</h2>
<h6 class="py-4">Find it in our collection of second-hand books</h6>
<button class="explr btn-lg text-center">Explore</button>
</div>
<img class="img-fluid d-none d-sm-block" src="img/bookrow.png" alt="">
</div>
</div>
</section>
<!--featured-->
<section class="feature p-5">
<h2 class="text-center">This Week's Recommendations</h2>
<h4 class="text-center py-3">Our recommendations this week focus on Latin American authors</h4>
<div class="row text-center g-4">
<div class="col-sm">
<div class="card" style="width: 18rem;">
<img src="img/books/linro1.webp" alt="book cover image" class="card-img-top">
<div class="card-body">
<h3 class="card-title">Pedro Paramo - Juan Rulfo</h3>
</div>
</div>
</div>
<div class="col-sm">
<div class="card" style="width: 18rem;">
<img src="img/books/libro3.webp" alt="book cover image" class="card-img-top">
<div class="card-body">
<h3 class="card-title">La Fiesta Del Chivo - Mario Vargas Llosa</h3>
</div>
</div>
</div>
<div class="col-sm">
<div class="card" style="width: 18rem;">
<img src="img/books/libro4.webp" alt="book cover image" class="card-img-top">
<div class="card-body">
<h3 class="card-title">Rayuela - Julio Cortázar</h3>
</div>
</div>
</div>
<div class="col-sm">
<div class="card" style="width: 18rem;">
<img src="img/books/libro5.webp" alt="book cover image" class="card-img-top">
<div class="card-body">
<h3 class="card-title">María - Jorge Isaacs</h3>
</div>
</div>
</div>
</div>
</section>