css - Center into div - Stack Overflow
To center the ul and also have the li elements centered in it as well, and make the width of the ul change dynamically, use display: inline-block; and wrap it in a centered div. .wrapper { text-align: center; } .wrapper ul { display ......