Long Page with sticky-footer - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Footer stick to bottom

Description

Long Page with 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">
* {<!--   w ww.j  av  a  2 s .  co  m-->
   margin:0;
}

html, body {
   height:100%;
}

.wrapper {
   min-height:100%;
   height:auto !important;
   height:100%;
   margin:0 auto -5em;
}

.footer {
   position:relative;
   width:100%;
   margin:0 auto;
   padding:0;
   background-color:Chartreuse;
   text-align:center;
   height:5em;
   overflow:hidden;
}

.footer img {
   position:relative;
   width:401px;
   top:-239px;
   margin:0 auto;
}

.footer a {
   color:yellow;
   text-decoration:underline;
   border:0;
}

.footer p {
   position:absolute;
   left:0;
   bottom:5px;
   width:100%;
   padding:0;
   color:blue;
   font:0.9em arial,sans-serif;
}
</style> 
 </head> 
 <body> 
  <link rel="stylesheet" href="layout.css" ...> 
  <div class="wrapper"> 
   <p>Lorem ipsum dolor sit amet</p> 
   <div class="push"></div> 
  </div> 
  <div class="footer"> 
   <p>Lorem ipsum dolor </p> 
   <img src="https://www.java2s.com/style/demo/Firefox.png" width="400" height="258"> 
  </div>  
 </body>
</html>

Related Tutorials