So I have an UL in my website with around 30 list items, each list item contains an icon which is around 130px in width so the list extends into multiple rows.
The issue I am having is hard to explain so ill try using this jsfiddle.
ul {
display: table; margin: 10px auto;
}
li {
float: left; list-style: none; margin-left: 5px; padding: 5px 0;
}
li a {
background: #82B5DA;
border: 1px solid #599CCE;
border-radius: 3px;
padding: 5px; color: #333;
text-decoration: none;
}
So what I want is for the space between each of those list items to be dynamic and make it so the list item that is far RIGHT touches the edge of the screen instead of a gap appearing until there is enough space for a new list item. Once there is enough room for another list item to go on that row, the width between the items is reset.
Resuming, turn this:
|[aaaaaaaaa][bbbbbbbbbb][cc] |
|[dddddddddddddddddddbb][eeeee] |
In this:
| [aaaaaaaaa] [bbbbbbbbbb] [cc] |
| [dddddddddddddddddddbb] [eeeee]|
Hopefully that makes sense, new to posting here so apologies if this isn't correct in some way.