CSS Clear within float based columns - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Column Layout

Description

CSS Clear within float based columns

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

#sidebar { height:500px; border:1px solid red; float:left; width:100px; }
#content {<!--from  ww w.  j a va  2  s  . c o m-->
   margin:0 0 0 100px;
   width:200px;
}
#content #clearer {
   clear:both; zoom:1;
}


      </style> 
 </head> 
 <body> 
  <div id="sidebar"></div> 
  <div id="content"> 
   <div id="clearer">
     clearer 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials