If I have a list of items, where I want to move one particular item to the center of a horizontally growing block, irregardless of DOM order. How would I go about that, with flexbox (or anything else)?
I've made an example of what I mean here:
<div id="container">
<div id="a">A</div>
<div id="b">B</div>
<div id="c">C</div>
</div>
#container{
display: flex;
justify-content: center;
}
https://codepen.io/Slagon/pen/wvgmKBZ
Whichever of the boxes have the class .current should float the center. So for instance if C has .current, the order should be A C B. If A: B A C If B: A B C
Is this possible to do? If so, any tips on how to do it? :)