Hey there, I'm hoping you're doing well. I've run into a little issue with Bootstrap that I was hoping to get some help with. According to the Bootstrap documentation, it seems like .sticky-top may not be supported by some browsers anymore. So, I switched to using .fixed-top instead. However, when I apply this class, I notice that part of the body content gets hidden behind the navbar. I'm wondering if there's a different way to address this problem, or if the only solution would be to add a margin-top in the CSS. The .pt-5 class doesn't quite cut it in revealing the content properly. Thanks a bunch for any assistance you can provide.
:root {
--body-font: "Roboto Mono", monospace;
--main-font: "Caveat", cursive;
--secondary-font: "Dosis", sans-serif;
--primary-color: salmon;
--secondary-color: rgb(71, 66, 65)
--box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}
.navbar-brand {
font-family: var(--main-font);
font-size: 22px !important;
}
.text-secondary{
color: rgb(94, 94, 94);
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<meta name="description" content="I'm Marizabelle Aldana, 27yo developer based in Guatemala, currently living in London.">
<title>Marizabelle's website - Homepage</title>
<link rel="stylesheet" href="src/styles.css" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Amatic+SC&family=Anton&family=Caveat:wght@600&family=Dosis:wght@700&family=Roboto+Mono:wght@200&display=swap"
rel="stylesheet"
/>
<!-- CSS only -->
<link
href="https://cdn.jsdelivr.net/npm/bootstrap/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin="anonymous"
/>
<script
src="https://cdn.jsdelivr.net/npm/bootstrap/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin="anonymous"
></script>
<link href="images/favicon.ico" rel="shortcut icon" type="image/x-icon" />
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
<div class="container">
<a class="navbar-brand text-secondary" href="index.html">Home</a>
<button
class="navbar-toggler"
type="button"
data-bs-toggle="collapse"
data-bs-target="#navbarNav"
aria-controls="navbarNav"
aria-expanded="false"
aria-label="Toggle navigation"
>
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link text-secondary" href="about.html"
>About me</a
>
</li>
<li class="nav-item">
<a class="nav-link text-secondary" href="project.html">Projects</a>
</li>
<li class="nav-item">
<a class="nav-link text-secondary" href="about.html#email">Contact me</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="jumbotron jumbotron-fluid">
<div class="container">
<h1 class="display-4">Fluid jumbotron</h1>
<p class="lead">This is a modified jumbotron that occupies the entire horizontal space of its parent.</p>
</div>
</div>
<div id="greeting">
<img
id="cat-icon"
class="rounded mx-auto d-block pt-5"
src="https://img.icons8.com/external-tulpahn-flat-tulpahn/64/000000/external-happy-cat-emoji-tulpahn-flat-tulpahn.png"
/>
<br />
<div class="sentence text-center">
Hi
</div>
</div>
</body>