Center table in div - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Div Table

Description

Center table in div

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
 </head> <!--from w  w w  .  jav  a 2s  . co  m-->
 <body> 
  <div style="border: 1px grey solid; MARGIN-TOP: 20px; WIDTH: 100%;"> 
   <table id="needToCenter" style="margin: 2em auto; width: 80%; border: solid 1px #c00;"> 
    <tbody> 
     <tr> 
      <td> <a style="HEIGHT: 22px; FONT-WEIGHT: 900" id="viewDevicesForm:_idJsp146" href="http://localhost:9082/viewDevices.jsf?Flow=view#" name="viewDevicesForm:_idJsp146">Lorem ips</a> </td> 
     </tr> 
    </tbody> 
   </table> 
  </div>  
 </body>
</html>

Related Tutorials