Craig England
Craig England

Reputation: 21

Whitespace at top of webpage

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.

www.craigengland.co.uk

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

Answers (4)

Vishnuprasad
Vishnuprasad

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

Amit Visodiya
Amit Visodiya

Reputation: 813

Remove margin-top from header.

 header {
    margin: 14% 0 0; /* remove this from main.css */
}

Upvotes: 1

Pradeep Sambandam
Pradeep Sambandam

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

Scoregraphic
Scoregraphic

Reputation: 7200

Add style="display: none" to your svg element and it should work.

Upvotes: 2

Related Questions