Centering Content Within a Table Column - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Column

Description

Centering Content Within a Table Column

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<!--from   w ww .  j  ava2s. c  o  m-->
 {
   text-align:center;
}

td
 {
   border:2px solid;
}
</style> 
 </head> 
 <body> 
  <table> 
   <thead> 
    <tr> 
     <th>Lorem ipsum dolor </th> 
    </tr> 
   </thead> 
   <tbody> 
    <tr> 
     <td> 
      <div> 
       <button name="short">Lorem</button> 
      </div> </td> 
    </tr> 
   </tbody> 
  </table>  
 </body>
</html>

Related Tutorials