My first JS challenge

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!
Please log in to post a comment
Log in with GitHubCommunity feedback
- @ApplePieGiraffe
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 helpful - @Andrii-Rohov
Hi, the position: fixed in body is preventing scrolling in mobile version
Marked as helpful - P@palgramming
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
Join 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