Get background and border to overflow - HTML CSS CSS Property

HTML CSS examples for CSS Property:background

Description

Get background and border to overflow

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">

.top,<!--from ww  w  .  ja va  2 s .c  o  m-->
.bottom {
   position: fixed;
   height: 100px;
   top: 0;
   left: 0;
   right: 0;
   background-color: red;
   z-index: 1;
}
.bottom {
   bottom: 0;
   top: auto;
   background-color: blue;
}
.middle {
   position: absolute;
   top: 100px;
   left: 0;
   right: 0;
   bottom: 100px;
}
.content {
   width: 100%;
   height: 1000px;
   background-color: yellow;
   border: 10px solid black;
   -moz-box-sizing: border-box;
   -webkit-box-sizing: border-box;
   box-sizing: border-box;
   margin-bottom: 100px;
}


      </style> 
 </head> 
 <body> 
  <div class="top">
    Top 
  </div> 
  <div class="middle"> 
   <div class="content">
     X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> X 
    <br> 
   </div> 
  </div> 
  <div class="bottom">
    Bottom 
  </div>  
 </body>
</html>

Related Tutorials