Responsive landing page of product preview
Design comparison
Solution retrospective
I am proud that I was able to successfully use a tag that I haven't used before even when the tag was posing to be an issue. I was able to overcome the issue. The picture tag is what I'm talking about.
What challenges did you encounter, and how did you overcome them?The challenge I had was setting up the images so that a particular image meant for mobile view shows and the other image appears for desktop screen size. I was able to overcome this using the picture tag which I highlighted in the README.md.
I also experienced another problem where the picture tag was giving extra space at the bottom and the top. I was able to overcome this using
picture{ font-size: 0; width: 100%;
Community feedback
- @HassiaiPosted over 1 year ago
Replace <div class="container"> with the main tag and the main tag with a section tag to fix the accessibility issues.
The header tag should be within the section tag.
<main> <picture><img></picture> <section> <header> ... its content goes here </header> ---- the rest of the content goes here <button></button> </section> </main>
Add the alt attribute
alt=" "
to the img tag and give it a value to fix the error issue. The value of the alt attribute is the description of the image. For decorative images like icons, there is no need to give it an alt value, for more on alt attribute Click here.There is no need to give .container a margin value.
Hope am helpful.
Well done for completing this challenge. HAPPY CODING
Marked as helpful1@ObikaviolaPosted over 1 year ago@Hassiai Done. Thank you for the feedback
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