CodePen

HTML

            
              <div class="overlay"></div>
<div class="first-element">cow</div>

            
          
!
via HTML Inspector

CSS

            
              body
{
  margin:0;
  
}
.first-element
{
  border:1px solid red;
  padding:5px;
  margin:0 auto;
  width:800px;
  margin-top:10px;
}

.overlay
{
  position:fixed;
  background:#000;
  height:100%;
  width:100%;
  z-index:2;
  opacity:0.7;
}
            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

            
              
            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................