Set a div at random position on a grid - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Position

Description

Set a div at random position on a grid

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <title>Lore</title> 
  <style>
TABLE {<!--   ww w .j  ava 2s  .  com-->
   border-collapse:collapse;
   border:6px solid Chartreuse;
   background-color:yellow;
}

TD {
   border:6px solid blue;
   width:31px;
   height:31px;
   background-color:pink;
}

TD.selected {
   background-color:OrangeRed;
}
</style> 
 </head> 
 <body> 
  <table class="alerts"> 
   <tbody> 
    <tr> 
     <td class="selected">&nbsp;</td>Lorem ipsum dolor si 
     <td>&nbsp;</td>Lorem ipsum dol 
    </tr>Lorem ips 
   </tbody> 
  </table>  
 </body>
</html>

Related Tutorials