Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
 
    <div class="header">
      <header id="header">
        <h1>HEADER</h1>       
      </header>
  </div>
  
  <div id="content">  
            <h2>First<br>Body Content<br>Body Content<br>Body Content <br>Body Content <br>Body Content<br>Body Content<br>Body Content<br>Body Content<br>Body Content<br>Body Content<br>Body Content <br>Body Content <br>Body Content<br>Body Content<br>Body Content<br>Body Content  <br>Last</h2> 
    
  <div class="push"></div>
  </div>
  
   <div id="footer">
     <h1>FOOTER</h1> 
   </div>
  
  
</body>
</html>
 
html {
  background:#fff;
}
html, body {
  height:100%;   margin:0;padding:0;
}
.header {  
  background:grey;
  margin:0 auto;
  position:fixed !important;
  position: absolute; /*ie6 and above*/
  top:0;
  left:0;
  right:0;
}
#header {
  width:80%;
  margin:0 auto;
  height:5em;
  text-align:center; 
}
#content {
 min-height: 100%;
height: auto !important;
    padding-top: 5em;
    box-sizing: border-box;
margin: 0 auto -5em auto;
  background:lightblue;
}
#footer {  
background:green;
margin:0 auto;
}
.push {
  height:5em;
}
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
4goodapppro
0viewers