Positioning Span element on a Table element - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Position

Description

Positioning Span element on a Table element

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<!--   w w  w  .  ja v a2 s .  co m-->
 {
   font-family:sans-serif;
}

.cont
 {
   postition:relative;
   width:100%;
}

table
 {
   width:inherit;
   border-collapse:collapse;
   border:2px solid Chartreuse;
}

th
 {
   padding:7px;
}

td
 {
   padding:4px;
   border:2px solid yellow;
}

.overlay
 {
   position:absolute;
   top:0;
   right:0;
}
</style> 
 </head> 
 <body> 
  <div class="cont"> 
   <table> 
    <thead> 
     <tr> 
      <th colspan="3">Lorem</th> 
     </tr> 
    </thead> 
    <tbody> 
     <tr> 
      <td>Lorem i</td> 
      <td>Lorem i</td> 
      <td>Lorem i</td> 
     </tr> 
     <tr> 
      <td>Lorem i</td> 
      <td>Lorem i</td> 
      <td>Lorem i</td> 
     </tr> 
     <tr> 
      <td>Lorem i</td> 
      <td>Lorem i</td> 
      <td>Lorem i</td> 
     </tr> 
    </tbody> 
   </table> 
   <span class="overlay">L</span> 
  </div>  
 </body>
</html>

Related Tutorials