Making overflowing div position to bottom parent div - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Position

Description

Making overflowing div position to bottom parent div

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">
#parent {<!--from   ww  w.j  a  va  2 s.com-->
   position:fixed;
   bottom:0;
   left:0;
   height:41px;
   overflow:visible;
   border:2px solid Chartreuse;
   width:100%;
   display:-webkit-box;
   display:-webkit-flex;
   display:-moz-box;
   display:-ms-flexbox;
   display:flex;
   -webkit-flex-wrap:wrap;
   -ms-flex-wrap:wrap;
   flex-wrap:wrap;
   list-style:none;
   padding:0px 0px 0px 21px;
   margin:0px 0px 0px -21px;
}

.child {
   -webkit-box-flex:2;
   -webkit-flex:2;
   -moz-box-flex:2;
   -ms-flex:2;
   flex:2;
   position:relative;
   overflow:visible;
   margin-right:11px;
   margin-bottom:11px;
}

.child-content {
   position:absolute;
   bottom:0px;
   border:2px solid yellow;
   background-color:blue;
   height:105px;
   width:100%;
}

.actual-child-content {
   padding:11px;
}
</style> 
 </head> 
 <body> 
  <div id="parent"> 
   <div class="child"> 
    <div class="child-content"> 
     <div class="actual-child-content">
       Lorem ipsum dolor sit amet, consectet 
     </div> 
    </div> 
   </div> 
   <div class="child"> 
    <div class="child-content"> 
     <div class="actual-child-content">
       Lorem ipsum dolor sit amet, consectetur a 
     </div> 
    </div> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials