Use div to create a rectangle marker for table cell content - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Cell

Description

Use div to create a rectangle marker for table cell content

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">
div {<!--   w  w  w.  j a v  a2  s . co  m-->
   float:left;
   margin-right:11px;
}
</style> 
 </head> 
 <body> 
  <table> 
   <tbody> 
    <tr> 
     <td> 
      <div style="background-color:#90EE90;width:15px;height:15px;border:1px solid #000;"></div>Lorem ipsum</td> 
     <td> 
      <div style="background-color:#AFEEEE;width:15px;height:15px;border:1px solid #000;"></div>Lorem ips</td> 
     <td> 
      <div style="background-color:#FFF;width:15px;height:15px;border:1px solid #000;"></div>Lorem ip</td> 
    </tr> 
   </tbody> 
  </table>  
 </body>
</html>

Related Tutorials