I have this weird border all around my header:
It’s written in html and css, the relevant source code is below:
HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Killa Media</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<a href="#"><img class="logo" src="https://killa-media.com/wp-content/uploads/2022/11/Killa_logo.png" alt="Killa Media icon logo"> </a>
<nav>
<ul class="nav-links">
<li><a href="/about/" class="nav-item">ABOUT</a></li>
<li><a href="/services/" class="nav-item">SERVICES</a></li>
<li><a href="/contact/" class="nav-item">GET IN TOUCH</a></li>
</ul>
</nav>
</header>
CSS:
Any ideas?
Thanks.
I’ve tried using -10 margins, but that didn’t work properly.
I thought 100% width would fix this, it didn’t.
2
Answers
It seems you probably have either too much margin or padding.
Here is what I recommend:
Using CSS Reset
This will remove padding and margin from all elements.