The main problem is that the header is fixed and thus overlaying the main part of the web page. So what I did is just margin-top to the main part, which appears to be not working. Moreover, if you will deleted header, it can be seen that the main section just goes too up.
Overview: image|| without header
HTML:
<header class="header">
<nav class="navbar">
<ul class="navbar-nav">
<li class="nav-item"><a class="nav-link" href="index.html">Visualizer</a></li>
<li class="nav-item"><a class="nav-link" href="instruction.html">Instructions</a></li>
<li class="nav-item active"><a class="nav-link" href="credits.html">Credits</a></li>
</ul>
</nav>
</header>
<main class="credits">
<div class="">
<div class="cr-card">
<div class="cr-img">
<img src="img/p1.png">
</div>
<div class="cr-info">
<h1 class="cr-name">
Lorem
</h1>
<p class="cr-about">
lorem ipsum
</p>
<ul class="cr-links">
<li>
<a href="https://github.com/lorem"><i class="fab fa-github"></i></a>
</li>
<li>
<a href="https://t.me/lorem"><i class="fab fa-telegram"></i></a>
</li>
<li>
<a href="https://www.instagram.com/lorem/"><i class="fab fa-instagram"></i></a>
</li>
</ul>
</div>
</div>
<div class="cr-card">
<div class="cr-img">
<img src="img/p1.png">
</div>
<div class="cr-info">
<h1 class="cr-name">
Lorem
</h1>
<p class="cr-about">
lorem ipsum
</p>
<ul class="cr-links">
<li>
<a href="https://github.com/lorem"><i class="fab fa-github"></i></a>
</li>
<li>
<a href="https://t.me/lorem"><i class="fab fa-telegram"></i></a>
</li>
<li>
<a href="https://www.instagram.com/lorem/"><i class="fab fa-instagram"></i></a>
</li>
</ul>
</div>
</div>
<div class="cr-card">
<div class="cr-img">
<img src="img/p1.png">
</div>
<div class="cr-info">
<h1 class="cr-name">
Lorem
</h1>
<p class="cr-about">
lorem ipsum
</p>
<ul class="cr-links">
<li>
<a href="https://github.com/lorem"><i class="fab fa-github"></i></a>
</li>
<li>
<a href="https://t.me/lorem"><i class="fab fa-telegram"></i></a>
</li>
<li>
<a href="https://www.instagram.com/lorem/"><i class="fab fa-instagram"></i></a>
</li>
</ul>
</div>
</div>
</div>
</main>
SCSS:
.header {
margin-top: 0px;
top: 0;
width: 100%;
height: $header-height;
z-index: 5;
background: radial-gradient(at center top, rgb(46, 51, 58) 0, rgba(27, 30, 34, 0) 80%);
border: 1px;
.navbar {
width: 100%;
margin-right: auto;
margin-left: auto;
display: flex;
flex-flow: row nowrap;
justify-content: center;
align-items: center;
.navbar-nav {
display: flex;
flex-flow: row nowrap;
align-items: center;
justify-content: center;
.nav-item {
display: flex;
align-items: center;
justify-content: center;
color: #ffffff;
cursor: pointer;
.nav-link {
font-family: "Raleway", "Hack", Arial, sans-serif;
font-size: 1.1em;
color: white;
height: 68px;
line-height: 68px;
padding: 0 15px;
border-bottom: 0px #3d5cff solid;
&:hover {
border-bottom: 5px #3d5cff solid;
}
}
&.active {
.nav-link {
border-bottom: 5px #fff solid;
}
}
}
}
}
}
Aucun commentaire:
Enregistrer un commentaire