Design comparison
SolutionDesign
Solution retrospective
Anyone know why the jpg isn't switching correctly? And why are the dimensions off?
Community feedback
- @Himanshu-196018Posted about 1 year ago
Hello @beowulf1958,
If you want to switch between different images, it is recommended to use
<picture>
tag, through which you can switch between different images according to width of your browser window.For the dimensions try using
min-width
andmax-width
property withwidth
for better responsive design. Same for height. For example:.card-container { width: 100%; min-width: 20rem; /* give min width of your own */ max-width: 40rem; /* give max width of your own */ }
I hope this will solve your problems a little bit.
Happy Coding
Marked as helpful1 - @lisztomania23Posted about 1 year ago
Hello, I made a few tweaks and created a pull request to your GitHub repo; merge it if you like.
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