Make put a stretchable item in between two fixed sized items in a single row - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:2 Column

Description

Make put a stretchable item in between two fixed sized items in a single row

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">

header {<!--from   w w w.java 2 s . c  o m-->
   position: relative;
}
div {
   outline: 1px solid red;
}
.div1 {
   width: 100px;
   float: left;
}
.div2 {
   margin-right: 100px;
}
.div3 {
   width: 100px;
   top: 0;
   right: 0;
   position: absolute;
}


      </style> 
 </head> 
 <body> 
  <header> 
   <div class="div1">
     Child 1 
   </div> 
   <div class="div2">
     Child 2 
   </div> 
   <div class="div3">
     Child 3 
   </div> 
  </header>  
 </body>
</html>

Related Tutorials