CSS Tables and spacing - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table

Description

CSS Tables and spacing

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">
body {<!--from w  ww.ja v a 2s .co m-->
   padding:0;
   margin:0;
}

#nav {
   float:right;
}

#nav div {
   display:block;
   float:left;
   width:121px;
   height:41px;
}

#nav div + div {
   margin-left:11px;
}

.red {
   background-color:Chartreuse;
}

.green {
   background-color:yellow;
}

.blue {
   background-color:blue;
}
</style> 
 </head> 
 <body> 
  <div id="nav"> 
   <div class="red"></div> 
   <div class="green"></div> 
   <div class="blue"></div> 
  </div>  
 </body>
</html>

Related Tutorials