HTML CSS examples for CSS Widget:Div Table
Center table in div
<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>