Height 100% Property Clipping 3 Column - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:3 Column

Description

Height 100% Property Clipping 3 Column

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

html,<!--from w  ww  .j  a v a  2s .  c o m-->
body {
   height: 100%;
   width: 100%;
   margin: 0;
}

#container {
   height: 100%;
}

#leftcol {
   float: left;
   width: 20%;
   background: #DDDDDD;
   height: 100%;
}

#centercol {
   float: left;
   width: 30%;
   background: #EEEEEE;
   height: 100%;
}

#rightcol {
   float: left;
   width: 50%;
   background: #000;
   color: #FFF;
   font-size: 25px;
   height: 100%;
}

.cf:before,
.cf:after {
   content: " ";
   display: table;
}

.cf:after {
   clear: both;
}
      </style> 
 </head> 
 <body> 
  <div id="container"> 
   <div id="leftcol"> 
    <p>Left Column</p> 
   </div> 
   <div id="centercol"> 
    <p>center column</p> 
   </div> 
   <div id="rightcol"> 
    <p> test test test</p> 
   </div> 
   <div class="cf"></div> 
  </div>  
 </body>
</html>

Related Tutorials