Position absolute div - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Absolute Position

Description

Position absolute 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">
.main div<!--from  w ww.  j a  v a  2 s .c o  m-->
 {
   float:left;
}

.main .container_2
 {
   width:501px;
}

.main .container_1
 {
   width:41px;
}

.main
 {
   display:inline-block;
   padding:6px;
   color:Chartreuse;
   background-color:yellow;
}
</style> 
 </head> 
 <body> 
  <div class="main"> 
   <div class="container_1">
     Lor 
   </div> 
   <div class="container_2">
     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus sed fermentum. Aliquam erat volutpat. Vestibulum tortor neque, ornare vitae tempor hendre 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials