Positioning a div near bottom side of another div - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Position

Description

Positioning a div near bottom side of another div

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
 </head> <!--from   w  w w.j  ava  2s.  c  o  m-->
 <body> 
  <div style="background-color: yellow; width: 70%;
            height: 100px; position: relative;">
    Lorem i 
   <div style="background-color: green;
                position: absolute; left: 0; width: 100%; bottom: 0;"> 
    <div style="background-color: magenta; width: 100px;
                    height: 30px; margin: 0 auto; text-align: center">
      Lorem i 
    </div> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials