Design comparison
Solution retrospective
I struggled trying to fixing the images, I will appreciate any documentation or source to improve in that sense. Also, I couldn't hide the overflow from the main image without hidding the little box too. Any suggestion or comment would be great!
Community feedback
- @ApplePieGiraffePosted over 3 years ago
Greetings, Anderson Vallejo! 👋
Nice to see you complete another challenge! 😀 Good work on this one! 🙌
I think using absolute positioning for the floating cube is a good call since it needs to overlap the accordion card and the outside (and the same thing for the illustration in the mobile layout). The illustration and background image in the desktop layout can be placed with CSS background images, though. Doing so means you won’t have to add those images directly to your HTML (which will keep your markup a little cleaner) and I think it’s easier to manage background images with CSS because you won’t have to worry about things like overflow issues. If you’d like to learn more about CSS background images and how to use them, check out this tutorial from MDN. 🙂
My solution for this challenge isn't perfect, but you can check it out if you'd like any ideas from what I tried to do to position the different elements in this challenge. 😅
By the way, you can use the native HTML
<details>
and<summary>
elements to easily create a fairly accessible accordion without having to use any JS. If you’d like to learn more about those elements and how you can use them, check out this helpful article from MDN. 😉Keep coding (and happy coding, too)! 😁
Marked as helpful1@VallejoandersonPosted over 3 years ago@ApplePieGiraffe Hi, thanks for reviewing my code and thanks for the documentation you have linked to the comment I had no idea that there was such a thing like a <details> tag it really helps to keep a cleaner code I will save this to use it in a near future. By the way, your solution is amazing man! Greetings!
1@ApplePieGiraffePosted over 3 years ago@Vallejoanderson
Haha, thanks, Anderson! Yes, the
<details>
and<summary>
elements really are a saver! Glad you found that helpful! 😀0 - @Andrii-RohovPosted over 3 years ago
Hi, the position: fixed in body is preventing scrolling in mobile version
Marked as helpful0 - @palgrammingPosted over 3 years ago
Well the main thing I see is that the question should open when the whole question is clicked not just when the little arrow is clicked
0@VallejoandersonPosted over 3 years ago@palgramming Hi, Patrick. Thanks for reviewing my code. I'm trying to solve it! Greetings!
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