FAQ accordion card using vanilla JS with complex image stuff
Design comparison
Solution retrospective
This took me forever to get the images done correctly. And it's still not responsive at medium viewports, but I think the result is pretty close for the mobile and desktop versions.
Any recommendations on sizing when trying to have something responsive? Setting the container to a specific pixel height and width seems like not the best idea.
Thanks! This was fun :)
Community feedback
- @elaineleungPosted about 2 years ago
Hi rushinstuffin, I think you're right in saying that using a fixed pixel height and width for sizing is generally a bad idea. There are certain situations where I'd use it, like if I know the element will not change its size whatever no matter the viewport size. The other end of the extreme is when people use percentages like
width: 50%
for a container to make it responsive, only to see that it becomes barely viewable on screen. I findwidth: min()
to be a useful tool when sizing containers. You can check out this article over on web.dev that talks about responsive properties.Two quick suggestions I have for you: Try a higher breakpoint than 375px (maybe around tablet size 600/700px), and try to make the font size bigger. I think ideally you wouldn't want to do anything smaller than 0.75rem.
Good job with all the positioning though!
Marked as helpful1@kyle-barry-appsPosted about 2 years ago@elaineleung Thanks, again! I really appreciate it :)
1
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