Background images in area between header and footer - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Footer Color

Description

Background images in area between header and footer

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
body<!-- w ww .jav  a  2 s .c  o  m-->
 {
   background-color:Chartreuse;
   margin:0;
   padding:0;
}

.headercontainer
 {
   background-color:yellow;
   min-width:1000px;
   height:61px;
   border:2px solid blue;
   left:0;
}

.mainbodycontainer
 {
   margin:0 auto;
   overflow:auto;
   background-color:pink;
   min-width:1000px;
   padding:81px 0;
   background:url('https://www.java3s.com/style/demo/Google-Chrome.png') no-repeat center center fixed;
   -webkit-background-size:cover;
   -moz-background-size:cover;
   -o-background-size:cover;
   background-size:cover;
   width:601px;
   height:451px;
}

.footercontainer
 {
   background-color:OrangeRed;
   width:100%;
   height:83px;
   border:2px solid grey;
   left:0;
   position:fixed;
   bottom:0;
}

.header
 {
   margin:0px auto;
   width:1000px;
}

.mainbody
 {
   margin:0px auto;
   width:1000px;
}
</style> 
 </head> 
 <body> 
  <title>Lorem ipsum dolor sit amet</title> 
  <div class="headercontainer"> 
   <div class="header">
     Lorem ip 
   </div> 
  </div> 
  <div class="mainbodycontainer"> 
  </div> 
  <div class="footercontainer"> 
   <div class="footer">
     Lorem ip 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials