Position div near other div's - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Position

Description

Position div near other div's

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">
#functions {<!--   w w  w. ja va2 s  .c o m-->
   height:41px;
   margin-left:156px;
   padding-top:6px;
   padding-right:5px;
   padding-bottom:8px;
   padding-left:9px;
   white-space:nowrap;
   background-color:Chartreuse;
}

#sidemeniu {
   width:21%;
   height:301px;
   margin-top:6px;
   padding-top:6px;
   padding-right:5px;
   padding-bottom:8px;
   padding-left:9px;
   display:inline-block;
   background-color:yellow;
   float:left;
}

#servers {
   background-color:blue;
   float:right;
   width:79%;
   height:301px;
}
</style> 
 </head> 
 <body> 
  <div id="functions"></div> 
  <div> 
   <div id="sidemeniu"></div> 
   <div id="servers">
     Lorem i 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials