I have a design to implement that is supposed to have a centered column of shortcuts and then a text to the left of each.
It should look like this:
The column of the shortcuts should be centered below the title.
I can't get this to work with a responsive design. The markup I have is ATM this:
<div class="ax-learn__shortcuts">
<h2>Learn shortcuts</h2>
<div class="ax-learn__shortcuts-row">
<div>Go to home:</div>
<div><kbd>g</kbd>then<kbd>h</kbd></div>
</div>
<div class="ax-learn__shortcuts-row">
<div>Go to search:</div>
<div><kbd>g</kbd>then<kbd>s</kbd></div>
</div>
<div class="ax-learn__shortcuts-row">
<div>Go to learn:</div>
<div><kbd>g</kbd>then<kbd>l</kbd></div>
</div>
And the current CSS, which doesn't center it perfectly at all, is this:
.ax-learn__shortcuts {
display: flex;
flex-direction: column;
}
.ax-learn__shortcuts h2 {
text-align: center;
}
.ax-learn__shortcuts-row {
display: flex;
justify-content: center;
align-items: center;
}
And here's an example on Codepen