Design comparison
SolutionDesign
Solution retrospective
How can I get the transparent overlay to be the same size as the underlying NFT image?
Community feedback
- @manishdevelopsPosted almost 2 years ago
hi Alan you can use the below codes to get the overlay ..
.images { position: relative; } .overlay { position: absolute; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; }
hope it will work for you =)
Marked as helpful1@Pound-HashPosted almost 2 years ago@Manish-d-art
Positioning! Strange, I thought I tried that. Okay. And Flex to center. Got it.
Thank you
1@manishdevelopsPosted almost 2 years ago@Pound-Hash position relative in .images so the all child elements of this class with position absolute will work with respect to the .images
Glad it helped you...
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