Div does not cover the whole page?

I created a background that should cover the entire page. I know this is a simple question for most of you, but I tried everything !!! Every time I do something, it just closes the parent div. I want it to cover the whole web page! Here is what I still have.

<div id="bkgrd" style="z-index: 9999; display: none; position:absolute;top:25%;left:25%;right:25%;
bottom:25%;
margin:auto;
min-width:50%;
min-height:50%; background-color: #000000; opacity: 0.4;"></div> 
+3
source share
1 answer
#bkgrd {
    position:fixed;
    top:0;
    left: 0;
    width:100%;
    height:100%;
}
+9
source

All Articles