Table dynamic width with Div tags - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Div Table

Description

Table dynamic width with Div tags

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <title>Lorem </title> 
  <style type="text/css">
html,body {
   margin:0;
   padding:0;
}

#header {<!--from  w  w w  .  j  a v a  2  s.c om-->
   height:151px;
   min-width:601px;
   background:Chartreuse;
}

#menu {
   width:251px;
   float:right;
   background:yellow;
}

#info {
   min-width:351px;
   background:red;
}

#footer {
   height:21px;
   min-width:601px;
   background:blue;
   clear:both
}

#body {
   width:expression(((document.documentElement.clientWidth
   || document.body.clientWidth) < 601)?
   "601px" : "100%")
}
</style> 
 </head> 
 <body> 
  <div id="body"> 
   <div id="header">
     Lorem ip 
   </div> 
   <div id="menu">
     Lorem ipsum dolor 
   </div> 
   <div id="info">
     Lorem ipsum dolor sit 
   </div> 
   <div id="footer">
     Lorem ip 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials