Reputation: 55
My div is not being fully 100% as there is still a margin to it
output:
at the top there is still some whitespace
CSS code:
.topbar {
width: 100%;
height: 10%;
background-color: black;
}
thanks!
Upvotes: 1
Views: 91
Reputation: 251
html, body{
padding: 0;
margin: 0;
}
This may help you 😊.
Upvotes: 1
Reputation: 791
You have a margin
at your body probably.
Body comes with a default margin. Try this.
body {
margin: 0;
}
If this not work for you, try to set margin: 0
to your other elements to find which one causing this.
Also you can use developer tools and see where comes from this margin.
Upvotes: 3