I have a CSS Grid like this, and I want to be able to center the child elements horizontally. For example, in this pic, I want to see "Queen" come in the center and not at the left side.
Trying with align-items: center
and justify-content: center
does not work. What do I do?
This is my CSS (scss) for the grid (parent):
display: grid;
gap: 1rem 0;
grid-template-columns: 1fr;
--node-min-width: 235px;
@media (min-width: 576px){
grid-template-columns: repeat(auto-fit, minmax(var(--node-min-width), 1fr));
}