I have an unordered list with list items that I want to spread evenly from each other but the elements don’t spread evenly.
<footer>
<ul class="footer">
<li><a href="about">Name©2023</a></li>
<li><a href="legal">Privacy&Legal</a></li>
<li><a href="vin-recall-search">Vehicle Recalls</a></li>
<li><a href="contact">Contact</a></li>
<li><a href="blog">News</a></li>
<li><a href="updates">Get Updates</a></li>
<li><a href="findus/list">Locations</a></li>
</ul>
</footer>
In the CSS file:
footer li{
word-spacing:20px;
display:inline-block;
}
The word spacing between the items isn’t identical.
it looks like this
2
Answers
That’s because you use the spacing on the li elements instead of the ul element.
You need to change your CSS like below.
You can use the new Flexbox specification as well
For Ref: https://css-tricks.com/snippets/css/a-guide-to-flexbox/