Design comparison
Community feedback
- @HassiaiPosted almost 2 years ago
Replace<div class="card">with the main tag and <div class="attribution"> with the footer tag to fix the accessibility issues. click here for more on web-accessibility and semantic html
To center .card on the page, add min-height:100vh; display: flex; align-items: center: justify-content: center; or min-height:100vh; display: grid place-items: center to the body.
Use rem or em as unit for the padding, margin, width and preferably rem for the font-size for more on CSS units Click here
Give .card the card a max-width value, instead giving the body a width value that is equal to screen-size that was specified in the styleguide.md
the desktop image is not visible because you forgot to add "./" in the beginning of the url value. url('./images/image-product-desktop.jpg') instead of url('images/image-product-desktop.jpg')
Hope am helpful.
Well done for completing this challenge. HAPPY CODING
Marked as helpful0 - @Waldo3333Posted almost 2 years ago
I noticed you used the desktop image for the mobile background =
"@media max-width: 799px { .card .card-img { width: 340px; height: 472px; border-bottom-left-radius: 8px; background-image: url('images/image-product-desktop.jpg'); } }"
and the mobile image for the desktop size =
"<div class="card"> <img class="card-img" src="./images/image-product-mobile.jpg" alt="">
</div>"may switching them could fix the image glitch :)
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