I've got this html:
<div class="ul">
<span class="1"><a href="#">Example</a></span>
<span class="2"><a href="#">Example</a></span>
<span class="3"><a href="#">Example</a></span>
<span class="4"><a href="#">Example</a></span>
</div>
And this CSS:
body {
font-family: 'Courier New', Courier, monospace;
margin: auto;
background:var(--main-bg);
color: var(--main-fg);
}
.ul {
position: relative;
margin: auto;
width: 100%;
}
.nav span {
position: relative;
max-width: 100%;
list-style: none;
padding-left: 5px;
text-align: center;
}
But none of the various centering methods in CSS work for it. They all just end up being in a single line, not centered at all.