Align div to bottom inside parent - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Parent Container

Description

Align div to bottom inside parent

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">
* {<!--from w w w  .  j a  v a 2  s  .c om-->
   padding:0px;
   margin:0px;
}

body {
   margin:31px;
}

.graph {
   width:100%;
   height:201px;
   background-color:Chartreuse;
}

.weekbar {
   width:4.2%;
   margin-left:0%;
   margin-right:0%;
   display:inline-block;
   background-color:yellow;
   position:relative;
   top:51%;
}

.graph div:nth-child(even) {
   background-color:blue;
}

.start {
   margin-left:0px;
}

.end {
   margin-right:0px;
}
</style> 
 </head> 
 <body> 
  <!-- content to be placed inside <body>?</body> --> 
  <div class="graph"> 
   <div style="height: 10%;" class="weekbar start"></div> 
   <div style="height: 10%;" class="weekbar"></div> 
   <div style="height: 20%;" class="weekbar"></div> 
   <div style="height: 10%;" class="weekbar"></div> 
   <div style="height: 10%;" class="weekbar"></div> 
   <div style="height: 10%;" class="weekbar"></div> 
   <div style="height: 50%;" class="weekbar"></div> 
   <div style="height: 10%;" class="weekbar"></div> 
   <div style="height: 10%;" class="weekbar"></div> 
   <div style="height: 10%;" class="weekbar"></div> 
   <div style="height: 10%;" class="weekbar"></div> 
   <div style="height: 30%;" class="weekbar"></div> 
   <div style="height: 10%;" class="weekbar"></div> 
   <div style="height: 10%;" class="weekbar"></div> 
   <div style="height: 10%;" class="weekbar"></div> 
   <div style="height: 10%;" class="weekbar"></div> 
   <div style="height: 10%;" class="weekbar"></div> 
   <div style="height: 10%;" class="weekbar"></div> 
   <div style="height: 10%;" class="weekbar"></div> 
   <div style="height: 10%;" class="weekbar end"></div> 
  </div>  
 </body>
</html>

Related Tutorials