Css fluid layout - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Layout

Description

Css fluid layout

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">
.textBarContainer {<!-- w w  w.  j a  v a2 s  .c  om-->
   display:table;
   width:100%;
}

.textBar {
   display:table-cell;
   padding:0 11px;
   white-space:pre;
}

.textBarAfter, .textBarBefore {
   background:Chartreuse;
   width:51%;
   height:21px;
   display:table-cell;
   content:' ';
   border-radius:6px;
}
</style> 
 </head> 
 <body> 
  <div class="textBarContainer"> 
   <div class="textBarBefore"></div> 
   <div class="textBar">
     Lorem ipsum dolo 
   </div> 
   <div class="textBarAfter"></div> 
  </div>  
 </body>
</html>

Related Tutorials