Design comparison
Solution retrospective
- In the desktop layout I struggled to crop the img to the container while allowing the box-img to overflow. I used overflow:hidden on the container and position:fixed on the box. Is there a better way to achieve that?
- Is there any way to make images load in the correct position? The screenshots (from initial page load) show the images in the wrong place - they only display correctly after full page load.
Community feedback
- @Lucky-victoryPosted about 3 years ago
you can't use <h2> in a <span> element, if your purpose of doing that was to make the text bold, then you should use <strong> element instead.
Marked as helpful1@agariochPosted about 3 years ago@Lucky-victory thanks, I wasn't aware of that! Changed span to div.
1 - @kenreibmanPosted about 3 years ago
For desktop, you're using the mobile background for the card, you should replace that with the correct desktop background.
To make the box "overflow" on the side, you should have a wrapper going around the desktop image with a position relative, then use position: absolute on the "illustration-box" and positioning it to the very left and center of the wrapper.
If you're confused, take a look at my github code for the same challenge. I did:
.wrapper-illustration { position: relative; } /* ILLUSTRATION BOX */ .illustration-box { position: absolute; left: -5.5rem; top: 7rem; z-index: 10; width: 191; height: 184px;
EDIT: Looked at your live site, looks like you solved the issue!
Marked as helpful0@agariochPosted about 3 years ago@lmaoken thanks, yes, the screenshots weren't showing the final layout, I think because I was using a CSS media query to change the image source rather than showing/hiding 2 images.
I looked at your solution, it's great, really clean and I like the floating box animation a lot!
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