spaceman(og) practice project - Stats preview card component
Design comparison
Solution retrospective
Hi everyone. I struggled with this one in the following two areas:
- Giving the Hero Image the Purple tint!
- Using the Picture HTML element.
If you have any feedback for me on how I can improve on those areas, I will really appreciate it.
Community feedback
- @DrougnovPosted about 2 years ago
Hi @SpacemanOG, the design is looking great. Good job.
Use a pseudo-element(
::after
,::before
) to create an overlay on that image container. Like this:.heroImage::after { position: absolute; content: ""; width: 100%; height: 100%; background: hsla(277, 64%, 40%, 0.6); top: 0; left: 0; }
And don't forget to add
position: relative
to theheroImage
.You can remove the 'source media' for the 300px width as the
img
will be shown by default on lower that 1200px width screen.Hope this helps. Have a good day :)
Marked as helpful0@SpacemanOGPosted about 2 years ago@Drougnov Hi bro. I see that you are from Bangladesh, just like me 🙏
Thanks for the suggestions by the way. I have applied it and updated the code. Had to make some minor adjustments, but I think it is okay now.
1
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