Inline-block fluid layout - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Layout

Description

Inline-block fluid layout

Demo Code

ResultView the demo in separate window

<html lang="en">
 <head> 
  <title>Lorem ipsum dolor s</title> 
  <style>
html, body, #page-div, #inline-wrapper, #top-content {
   height:100%;
   width:100%;
   margin:auto;
   background:Chartreuse;
}

#page-div {<!--from w  w w  .j a v a2s  .  c om-->
   height:91%;
   width:81%;
   display:table;
   table-layout:fixed;
   background-color:yellow;
}

#inline-wrapper {
   background-color:blue;
   display:table-cell;
}

#top-content {
   display:table;
   border-collapse:collapse;
   background-color:pink;
}

#left, #center, #right {
   display:table-cell;
}

#left, #right {
   background-color:OrangeRed;
   color:grey;
}

#center {
   width:75%;
   height:1701px;
}

#footer {
   background:white;
   margin:auto;
   border:solid
}
</style> 
 </head> 
 <body translate="no"> 
  <div id="page-div"> 
   <div id="inline-wrapper"> 
    <div id="top-content"> 
     <div id="left">
       Lorem ipsum dolor sit 
     </div> 
     <div id="center">
       Lorem ipsum dolor sit amet 
     </div> 
     <div id="right">
       Lorem ipsum dolor sit 
     </div> 
    </div> 
   </div> 
  </div> 
  <div id="footer">
    Lorem 
  </div>  
 </body>
</html>

Related Tutorials