Reputation: 21
I am having an issue with around 20px of whitespace at the top of my webpage. It is hard to see but when you inspect element you can see the little gap at the top.
I have adopted
* {
margin: 0;
padding: 0;
}
but to no avail
Any suggestions?
I have tried "normalize" locally and it still doesn't fix the problem.
Upvotes: 2
Views: 67
Reputation: 113
well, while inspecting your web page. its show this whitspace in the header because of the margin you have given to it in the css
margin: 14% 0 0% 0%;
when I disable the margin you have given, the white space is no more to be seen . Header tag looks fine without that margin setting you gave.
I don't see any other error!
Upvotes: 0
Reputation: 813
Remove margin-top
from header
.
header {
margin: 14% 0 0; /* remove this from main.css */
}
Upvotes: 1
Reputation: 683
svg tag content after the body tag and before the header tag is causing that. Remove that whitespace issue will be fixed or if you want to do this using CSS, Add the following code to your css file.
svg{display:none;}
Upvotes: 4
Reputation: 7200
Add style="display: none"
to your svg element and it should work.
Upvotes: 2