Scroll with dynamically sized headers/footers - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Footer

Description

Scroll with dynamically sized headers/footers

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">
.wrapper {<!--from  w  ww  .jav a  2s.  c  o  m-->
   height:401px;
   border-left:2px solid Chartreuse;
   display:grid;
   grid-template-columns:2fr;
   grid-template-rows:[header] auto [content]2fr [footer]auto;
}

.header {
   grid-row:header;
}

.footer {
   grid-row:footer;
}

.header, .footer {
   background-color:yellow;
}

.scroller {
   background-color:blue;
   overflow:auto;
   grid-row:content
}
</style> 
 </head> 
 <body> 
  <div class="wrapper"> 
   <div class="header">
     Lorem 
    <br>Lorem ip 
   </div> 
   <div class="scroller">
     Lorem ips 
    <br>Lorem ips 
    <br>Lorem ips 
    <br>Lorem ips 
    <br>Lorem ips 
    <br>Lorem ips 
    <br>Lorem ips 
    <br>Lorem ips 
    <br>Lorem ips 
    <br>Lorem ips 
    <br>Lorem ips 
    <br>Lorem ips 
    <br>Lorem ips 
    <br>Lorem ips 
    <br>Lorem ips 
    <br>Lorem ips 
    <br>Lorem ips 
    <br>Lorem ips 
    <br>Lorem ips 
    <br>Lorem ips 
    <br>Lorem ips 
    <br>Lorem ips 
    <br>Lorem ips 
    <br>Lorem ips 
    <br>Lorem ips 
    <br>Lorem ips 
    <br>Lorem ips 
    <br>Lorem ips 
    <br>Lorem ips 
    <br>Lorem ips 
    <br>Lorem ips 
    <br>Lorem ips 
    <br> 
   </div> 
   <div class="footer">
     Lorem 
    <br>Lorem ip 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials