Remove the float: left; and use either display: flex; justify-contect: center; or text-align: center with display: inline-block