Create an Absolute position div container in a floating div - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Absolute Position

Description

Create an Absolute position div container in a floating 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<!--  www .j a  v a 2 s.  c o m-->
 {
   position:relative;
   width:241px;
   height:201px;
   background-color:Chartreuse;
}

.child
 {
   position:absolute;
   bottom:0;
   width:100%;
   background-color:yellow;
}
</style> 
 </head> 
 <body> 
  <div class="parent"> 
   <div class="child">
     I`m a child 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials