I currently have two divs above each other and I have both of their margin and padding set to zero and the body's margin and padding set to 0 as well.
Here is my code:
body{
margin: 0;
padding: 0;
}
.navbar--darkmode {
display: flex;
gap: var(--gap, 1rem);
padding: 1.5em;
background-color: #152028;
}
.navbar--darkmode>.logo {
display: inline;
margin-block: auto;
margin: 0;
padding: 0;
font-family: 'Fira Mono', monospace;
font-weight: 500;
font-size: larger;
color: white;
}
.nav-link--darkmode {
color: white;
text-decoration: inherit;
font-family: 'Fira Mono', monospace;
margin-right: 1em;
}
.primary-navigation {
list-style: none;
padding: 0;
margin: 0;
}
.primary-navigation>li {
display: inline;
}
.primary-header {
align-items: center;
justify-content: space-between;
margin-bottom: 0;
position: relative;
}
.page {
margin: 0;
padding: 0;
position: fixed;
}
.page--darkmode {
margin: 0;
padding: 0;
width: auto;
height: 100vh;
background-color: #282434;
}
<div class="primary-header navbar--darkmode">
<h1 class="logo">NAME GOES HERE</h1>
<nav>
<ul class="primary-navigation">
<li>
<a class="nav-link--darkmode" href="/">Home</a>
</li>
<li>
<a class="nav-link--darkmode" href="/about">About</a>
</li>
<li>
<a class="nav-link--darkmode" href="/projects">Projects</a>
</li>
<li>
<button></button>
</li>
</ul>
</nav>
</div>
<div class="page--darkmode">
<h1>hi</h1>
</div>
I'm not too sure whats causing this gap because when I inspect element there's nothing there that's causing this gap so am I missing something or is there an element that's force creating a new line that I'm not aware of? Thanks!
Edit: Fixed css to be more accurate to css file I have