Help me remove the space above and by the left side of my nav ba

Help me remove the space above and by the left side of my nav ba
0

Hello guys, I’m working on this portfolio template and I need your help removing that tiny space at the top and the left side of my navbar, can this be done without bootstrap?
here’s my HTML

<!DOCTYPE html>
<html>
    <head>
        <link href="main.css" rel="stylesheet" type="text/css">
<title>
    Ola amin
</title>
    </head>
    <body text="blanchedalmond">
        <header >
            <div class= "containter">
                <img src="owl.png" height="65px">
                <nav>
                    <ul>
                        <li><a href="#">Home</a></li>
                        <li><a href="#">Me</a></li>
                        <li><a href="#">projects</a></li>
                        <li><a href="#">why me</a></li>
                        <li><a href="#">let's talk</a></li>
                    </ul>
                </nav>
     
            </div>
         
        </header>
<!-- <div>
    <pre>
        Lorem ipsum dolor sit amet,
         consectetur adipisicing elit. 
         Provident temporibus id quia, 
         enim error voluptatum eaque voluptatibus
          minus voluptas recusandae officia ea 
          inventore corrupti, minima fugit unde quisquam ad libero!
    </pre>
</div> -->
    </body>
</html>

and my CSS

body{
    background-color:black;
}

/* pre {
color: blanchedalmond;
text-align: left
;
} */
 header{
     margin: 0px ;
background-color:#2D2D2D;
height: 50px;
padding: 0px;
 }
 header::after {
    content : ""; 
    display : table ;
    clear : both ; 
    }


a {
     text-decoration: none;
     color: inherit;
 }

 ul {
     list-style: none;
     margin-right: 20px;
 }
 li{
     display: inline;
     padding-left: 15px;
 }
 nav{
     float: right;
 }
 img {
     float: left;
height: 50px;     
 }



1 Like

So simple remove the margin and padding of the body i.e.

body{
     margin:0;
     padding:0;
}
2 Likes

Thanks alot Fatma that was really helpful :heart:

1 Like