Make a border-layout using css - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:3 Column

Description

Make a border-layout using css

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <title>Border Layout CSS</title> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">

div {<!--from ww w  .j a v  a  2 s. co  m-->
   border: 1px solid #d3d3e3
}

#north {
   margin: 0;
   padding: 1em;
}

#south {
   margin: 0;
   padding: 1em;
}

#east {
   margin: 0;
   padding: 1em;
   width: 6em;
   height: 22em;
   float: left;
   margin-right: 1.1em
}

#west {
   margin: 0;
   padding: 1em;
   width: 6em;
   height: 22em;
   float: right;
   margin-left: 1.1em
}

#center {
   margin: 0;
   padding: 1em;
   padding-bottom: 0em;
}

#center:after {
   content: ' ';
   clear: both;
   display: block;
   height: 0;
   overflow: hidden
}

      </style> 
 </head> 
 <body> 
  <div id="north">
    North 
  </div> 
  <div id="east">
    East 
  </div> 
  <div id="west">
    West 
  </div> 
  <div id="center">
    Center 
  </div> 
  <div id="south">
    South 
  </div>  
 </body>
</html>

Related Tutorials