Within a horizontal navbar, I have various small images that are currently spaced out with different intervals between them. Each image has its own unique spacing from the others.
I am looking to achieve consistent spacing between each image in this horizontal navbar, as shown in the desired result screenshot linked here. Thank you.
https://i.sstatic.net/JFLj0.png
I have attempted to use different justify-content
properties without success.
You can also view the code on Codepen.
.my-container {
display: flex;
max-width: 1080px;
margin-left: auto;
margin-right: auto;
}
.my-flex {
display: flex;
flex-wrap: nowrap;
}
.disable {
display: block;
overflow: hidden;
text-decoration: none;
text-indent: 110%;
}
li {
list-style-type: none;
}
/* CSS for individual images */
.atalanta {
background: url('https://i.ibb.co/MfVyXRY/atalanta.png') no-repeat 50%;
background-size: 35px 35px;
padding-top: 18px;
}
.bologna {
// Repeat same structure for other images...
}
...
.udinese {
background: url('https://i.ibb.co/bWFBx1V/udinese.png') no-repeat 0%;
background-size: 35px 35px;
padding-top: 18px;
}
<head>
<!-- Boostrap Files -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="https://getbootstrap.com/docs/5.3/assets/css/docs.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<!-- My Css -->
</head>
<body>
<div class="my-container">
<nav class="navbar bg-body-tertiary my-flex">
<div class="container-fluid">
<!-- Insert li elements for each image -->
</div>
</nav>
</div>
</body>