Design comparison
Solution retrospective
Tried to use div instead of table for the 2 main cells. I had a hard time with adding the magenta layer on top of the image. Also not sure how to round the corner of the rectangle such that it's not slanted.. and the image has 4 round corners rather than 2
Community feedback
- @NataliaKiwibirdPosted over 3 years ago
The desktop design looks pretty well, the responsiveness is not done though. I'd recommend going back to the challenge and finish it, as mobile design is key nowadays.
For the image filter use pseudoelement :after and set opacity and mix-blend-mode. Instead of <table>, I'd use <ul> and style it with flex and flex-direction: row. It's always good to look at other people's solutions and see how they approach particular components. For example, this is mine: https://www.frontendmentor.io/solutions/stats-preview-card-using-html-css-flexbox-bem-_Sdvvyfd3
Marked as helpful0 - @rpariasPosted over 3 years ago
Hi, in order to round only 2 corners you can use the same property: border-radius: 0 10px 10px 0;
The first value is the top-left corner, the second is the top-right corner, the third is the bottom-right and the last is the bottom-left.
To add the magenta layer on top of the image you can use the property mix-blend-mode. Something like this:
.picture { position: relative; }
.picture::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0.6; mix-blend-mode: revert; background-color: var(--soft-violet); }
In addition, you can take a look at this video: https://www.youtube.com/watch?v=mT10ZJdlh9Y
Marked as helpful0
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