Design comparison
Solution retrospective
Focused on mobile first and made it easier to change to desktop.
What challenges did you encounter, and how did you overcome them?Worked with two imgs in the html. One for mobile and one for desktop and alternated between them via display none through media queries for mobile and desktop.
What specific areas of your project would you like help with?Is there another method to change between these two imgs for mobile and desktop?
Community feedback
- @Chermann-KINGPosted 7 months ago
Hi Jarmo ππΎπ
First of all, congratulations ππΎ on the work you've doneπ. It's not bad at this level. Now you just have to take into account the elements provided for particular types. That's the best way to improve accessibility.
I recommend that in this type of case where the interface designer provides you with several images depending on which device the user will end up on, you use the picture tag in HTML, which potentially receives
source
tags and theimg
tag. This will simplify stylisation and is mainly designed for this type of case.Here's the link to my solution if you want to see how I solved the challenge π
Marked as helpful1 - @MtrxxoPosted 7 months ago
Hello Jarmo, Yes, there's another way of changing the images, you can try Using the picture element like this:
"<picture>
<source media="(min-width: 768px)" srcset="{desktop image path here}"> <img src="{mobile image path here}" alt="{alternative text here}">
</picture>"
Your code looks great, Happy Coding πβ¨
Marked as helpful0
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