Div Element Position to cover partial - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Position

Description

Div Element Position to cover partial

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">
.one {<!--  www  .  j  a v  a  2s. c  o  m-->
   height:100px;
   width:100px;
   background:Chartreuse;
   position:relative;
}

.two {
   height:100px;
   width:100px;
   background:yellow;
   position:absolute;
   bottom:-31px;
   left:31px;
}
</style> 
 </head> 
 <body> 
  <div class="one"> 
   <div class="two"></div> 
  </div>  
 </body>
</html>

Related Tutorials