Positioning element on right side of table header - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Position

Description

Positioning element on right side of table header

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">
table thead th .wrapper {
   position:relative;
}

table thead th .resize {
   width:9px;
   background-color:Chartreuse;
   position:absolute;
   right:0px;
   top:0px;
   bottom:0px;
   z-index:2;<!--from w w  w . j a  v a2  s  .  c om-->
   cursor:col-resize;
}
</style> 
 </head> 
 <body> 
  <table> 
   <thead> 
    <tr> 
     <th> 
      <div class="wrapper"> 
       <span class="resize"> </span> 
       <div class="label">
         Lorem ipsu 
       </div> 
      </div> </th> 
     <th> 
      <div class="wrapper"> 
       <span class="resize"> </span> 
       <div class="label">
         Lorem ipsu 
       </div> 
      </div> </th> 
    </tr> 
   </thead> 
  </table>  
 </body>
</html>

Related Tutorials