Design comparison
Solution retrospective
I tried to center my attribution content to the center of the desktop layout, but know my [display:grid] columns were conflicting with my usual approach. If you have any suggestions on how you'd have done this, I'm all ears. Thanks.
Community feedback
- @slowjoPosted about 1 year ago
I understand that you wrote 'grid-columns: 1fr 1fr' for your card, so the card is fixed to two equal columns. Because there are three containers in it, the third one (.attribution) goes in the next row. All you have to do is add this:
.attribution { grid-column: 1 / 3; width: 100%; text-align: center; }
This way, the attribution element will go across both columns in the second row and it is easy to center the content.
Marked as helpful1@GrowingHermit44Posted about 1 year ago@slowjo Thanks for the tip, I'll keep this in mind when working with grids in the future.
0 - @smahidvPosted about 1 year ago
add a <footer>// move your attribution here </footer>
if you keep it inside the main it will normally follow the grid behaviourMarked as helpful1@GrowingHermit44Posted about 1 year ago@smahidv such a simple thing to overlook and forget, will give that a go, thanks.
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord