make responsive left side column in html - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Responsive Layout

Description

make responsive left side column in html

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 {<!--  w ww .  j a v a  2  s . c  o m-->
   background-color:Chartreuse;
   color:yellow;
   text-align:center;
   padding:6px;
}

#nav {
   line-height:31px;
   background-color:blue;
   display:table-cell;
   vertical-align:top;
   padding:6px;
   width:26%;
}

#section {
   display:table-cell;
   vertical-align:top;
   padding:11px;
}

#footer {
   background-color:pink;
   color:OrangeRed;
   clear:both;
   text-align:center;
   padding:6px;
}
</style> 
 </head> 
 <body> 
  <div id="header"> 
   <h1>Lorem ipsum </h1> 
  </div> 
  <div id="nav">
    Lorem ip 
   <br>Lorem i 
   <br>Lorem i 
  </div> 
  <div id="section"> 
   <h2>Lorem </h2> 
   <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus sed fermentum. Aliquam erat volutpat. Vestibulum tortor n</p> 
   <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus sed fermentum. Aliquam erat volutpat. Vestibulum tortor neque, ornare v</p> 
  </div> 
  <div id="footer">
    Lorem ipsum dolor sit amet, 
  </div>  
 </body>
</html>

Related Tutorials