0

I know this has been asked many times and I've tried the fixes provided.

I saw this post: Make div 100% height of browser window

and I followed what it said, make the div instead

height: 100%; /* Make it */
height: 100vh;

however my div still has a gap between the top of it and the browser window.

https://jsfiddle.net/hgs3d1n6/

What am I missing or not doing which is causing this problem? I've tried other suggestions to like making the html, body 100%.

Thanks.

Community
  • 1
  • 1
Munch
  • 739
  • 7
  • 19
  • `margin:0px 0px 0px 0px` add the following `css style` This is because of default margin settings just hoping so – Ankanna Feb 21 '16 at 21:35

1 Answers1

2

Both the body and paragraph elements have a default margin. The easiest way to clear that cross browser is with:

body,p {
    margin:0;
}

jsFiddle example

j08691
  • 204,283
  • 31
  • 260
  • 272