Div with border stretch down to top of sticky footer - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Footer stick to bottom

Description

Div with border stretch down to top of sticky 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">
header {<!--from w w w.ja  v  a  2  s  .  c  o m-->
   height:45px;
   background:orange;
}

article {
   box-sizing:border-box;
   border:2px solid Chartreuse;
}

footer {
   height:23px;
   background:green;
}

html {
   height:100%;
   width:100%;
}

body {
   min-height:100%;
   margin:0;
   display:flex;
   flex-direction:column;
}

article {
   flex:2;
}
</style> 
 </head> 
 <body> 
  <header>
    Lorem ip 
  </header> 
  <article>
    Lorem ipsum dolor sit amet, consectetu 
   <br> 
   <br>Lorem ipsum dolor sit amet, 
   <br> 
   <br>Lorem ipsum dolor sit amet, consectetur adipiscing el 
   <br>Lorem ipsum dolor sit amet, consectetur 
  </article> 
  <footer>
    Lorem ip 
  </footer>  
 </body>
</html>

Related Tutorials