Design comparison
Solution retrospective
Okay, I think everything is running fine. One small issue though: I couldn't align the two images for the mobile view perfectly in the center. Right now, they're almost in the center but not exactly.
Here's what I tried but didn't work:
- Put both images in a parent 'div'
- Used grid to align them along the cross axis
- Set width of both images to 100%
- Adjusted the width of the parent 'div' to however big I want my images to look
This worked in every other similar case I've dealt with before.
I opened the svg files for the mobile view in Inkscape to check. Found that the main image had an invisible part extending on the left. So, the actual image is wider than it actually appears (an invisible is extending on the left). That might be what's causing all the resizing and alignment issues. I might be wrong though.
Should I modify the actual svg image itself or is there a way to do it using css alone?
Would appreciate any suggestions on how to fix this.
Community feedback
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