HTML CSS examples for CSS Layout:Div Align
Aligning a div with list in it to the center with display: inline-block
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> ul {<!-- ww w. j a v a 2s. c om--> list-style:none; margin:0px; padding:0px; } </style> </head> <body> <div style="text-align:center;width:100%"> <div style="margin: 0 auto; display: inline-block;"> <ul> <li>Example</li> <li>Example</li> <li>Example</li> </ul> </div> </div> </body> </html>