Adjusting a div at the bottom of another div - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Div Align

Description

Adjusting a div at the bottom of another 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">
body {<!--  w  ww.j  av a  2  s  .co m-->
   width:301px;
}

.boxes {
   margin-left:5%;
   margin-right:-5px;
   height:346px;
   font-size:13px;
}

.box-one {
   background-image:url('http://www.java2s.com/style/demo/Google-Chrome.png');
   background-repeat:no-repeat;
   background-size:cover;
}

.index-image-text {
   padding-bottom:0;
   margin-bottom:0;
   position:relative;
   top:76%;
   font-weight:bold;
   border-bottom-left-radius:3px;
   border-bottom-right-radius:3px;
   color:Chartreuse;
   background-color:yellow;
   text-align:center;
   padding-top:11px;
}

h1 {
   padding-top:31px;
   text-align:center;
   color:blue;
}
</style> 
 </head> 
 <body> 
  <div class="boxes img-rounded box-one grid-20"> 
   <h1>Pottery Painting</h1> 
   <p class="index-image-text">Testing</p> 
  </div>  
 </body>
</html>

Related Tutorials