Design comparison
Solution retrospective
I could did this challenge with help. I have some difficult with floating and positioning objects above other things, so if someone can help me with how I could place the background and the box, I would be happy. THX!
Community feedback
- @GioCuraPosted over 1 year ago
Hi! 👋 Indeed the positioning of the background elements in this project is tricky.
To place absolutely positioned elements on top of another, you have to play with their
z-index
. Thez-index
controls the stacking order of all things displayed on screen.Since items have a
z-index
of1
by default, what you can do is addz-index: 2
to yourcard__image
. This will make it go on top of everything else.The same principle goes for positioning the box on the desktop version! However, for the desktop layout, I also recommend you to insert the illustration and its shadow as a
background-image
to yourcard-container
. That way, you wouldn't have to set yourcard-container
tooverflow: hidden
. This is important, since the box itself must overflow it!If you want to see how this works, I'd like to refer you to my solution.
Hope this helps!
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