Ok so basically this is Stock component, which use absolute position of cards, so css layouts cannot be used here, so you cannot center cards inside it.
You can try to center the hand itself, however this component does not set properly the with of the container (hand), the only way to center it is it actually changes size with the number of cards, but it does not.
Assuming it would have had actually size that would have worked
Code: Select all
centered {
display: flex;
justify-content: center;
}
i.e. you would have to add this to see it work
.hand {
width: 600px;
}
Unless any Stock experts here correct me, I don't see how it can be done easily here.
You can also see it if you block positioning
Code: Select all
.hand > * {
position: relative;
top: unset !important;
left: unset !important;
}
But if you do it - you also block the animation, which defeats the purpose of using stock.
If you want to have fancy layout just forget about the stock and place cards and do everything in js/css manually.