I am making a topnav and I don't want space between the body and the div element.
I want to look like that. But the thing is, I do not know how I can 'delete' or 'remove' the space between the body and the <div>
element.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title> Why Linux is just better than Windows - Ring Tips </title>
<link rel="icon" href="linux.png">
</head>
<body>
<style>
body {
background: #484d49;
padding: 0;
-webkit-font-smoothing: antialised;
}
.topnav {
top: 0;
position: sticky;
background: #a5b0a8;
border: 0.5px solid black;
width: 100%;
height: 100px;
overflow: hidden;
z-index: 2;
}
</style>
<div class="topnav"></div>
</body>
</html>
That's what I have done, but how can I use CSS or JavaScript to delete the space between the elements.
If you could help, that'd be great.
Thanks,
Ring Games