I am trying to align the copyright
element in my ul
to the right. The list is configured as display: inline-flex
. Strangely, the last item appears to not be moving at all.
nav {
text-align: center;
font-family: Helvetica;
opacity: 0.8;
background: #222222;
position: absolute;
bottom: 0;
width: 100%;
}
nav li {
display: inline-flex;
flex-wrap: wrap;
flex-direction: row;
font-size: 1em;
margin-right: .625em;
}
#copyright {
margin-left: auto;
}
<footer>
<nav>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
<li><a href="disclaimer.html">Disclaimer</a></li>
<li><a href="safety.html">Safety</a></li>
<li><a href="privacy-policy.html">Privacy Policy</a></li>
<li><a href="contact.html">Contact</a></li>
<li id="copyright">© 2020 Copyright LLC</li>
</ul>
</nav>
</footer>
My understanding is that margin-left: auto
should have pushed the last list element to the right, achieving my goal. I read somewhere that margin-left: auto
does not work on inline flexbox, although I can't find that link anymore to confirm. Can anyone verify?