skip to Main Content

I have this weird border all around my header:

Image

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:
Image

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


  1. It seems you probably have either too much margin or padding.
    Here is what I recommend:

    body{
    margin: 0px;
    }
    
    Login or Signup to reply.
  2. Using CSS Reset

    *{
        margin: 0;
        padding: 0;
     }
    

    This will remove padding and margin from all elements.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search