CodePen

HTML

            
              <body>
  <div class="head-wrapper">
     <header>
       this is the header
    </header>
  </div>
  
abcdefg<br>
abcdefg<br>
abcdefg<br>
abcdefg<br>
abcdefg<br>
abcdefg<br>
abcdefg<br>
abcdefg<br>
abcdefg<br>
abcdefg<br>
abcdefg<br>
abcdefg<br>
abcdefg<br>
abcdefg<br>
abcdefg<br>
abcdefg<br>
abcdefg<br>
abcdefg<br>
abcdefg<br>
abcdefg<br>
abcdefg<br>
abcdefg<br>
abcdefg<br>
abcdefg<br>
abcdefg<br>
abcdefg<br>
abcdefg<br>
abcdefg<br>
abcdefg<br>
abcdefg<br>
abcdefg<br>
abcdefg<br>
abcdefg<br>
abcdefg<br>
abcdefg<br>
abcdefg<br>
abcdefg<br>
  
</body>
            
          
!

↑ Insert the most common viewport meta tag

CSS

            
              .head-wrapper { 
  position:fixed; 
  top:0;  
  width:100%;
}

header { 
  width:50%; 
  margin:0 auto; 
  background-color:#ccc;
}
            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

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