HTML CSS examples for CSS Widget:Div Table
Center a fixed, table display div without setting a width
<html> <head> <title>Lorem ipsum dol</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> div {<!-- w ww . j a va 2s . com--> text-align:center; position:fixed; left:0; right:0; margin:auto; } span { border:2px solid Chartreuse; } </style> </head> <body> <div class="center"> <span>Lorem ipsum dol</span> </div> </body> </html>