I had a problem, more subtle for you, I am fast and this is the best solution that I have found so far.
What result looks like
Shows what the code output looks like. Borders simply show an interval and are not needed.
Html:
<div class="center"> <ul class="dots"> <span> <li></li> <li></li> <li></li> </span> </ul> </div>
CSS
ul {list-style-type: none;} ul li{ display: inline-block; padding: 2px; border: 2px solid black; border-radius: 5px;} .center{ width: 100%; border: 3px solid black;} .dots{ padding: 0px; border: 5px solid red; text-align: center;} span{ width: 100%; border: 5px solid blue;}
Not everything here is necessary to center the list items.
You can cut css before this to get the same effect:
ul {list-style-type: none;} ul li{display: inline-block;} .center{width: 100%;} .dots{ text-align: center; padding: 0px;} span{width: 100%;}
Carlos O'gorman Jun 01 '17 at 3:40 2017-06-01 03:40
source share