Design comparison
Solution retrospective
This is my second try in this challenge, in this one I implemented the BEM methodology and use Flexbox in a better way, any feedback is welcome :)
Community feedback
- @correlucasPosted about 2 years ago
👾Hello Alan Lopez, Congratulations on completing this challenge!
Your solution its almost done and I’ve some tips to help you to improve it:
1.Add transitions to make the interaction smoother while the element gets hovered, you can use a value like
transition: all ease-in 0.5s
.2.Use a CSS reset to avoid all the problems you can have with the default CSS setup, removing all margins, and making the images easier to work, see the article below where you can copy and paste this CSS code cheatsheet: https://piccalil.li/blog/a-modern-css-reset/
3.Using
<picture>
you’ve more control over the elements and its better than using the product image as<img>
orbackground-image
. Look that for SEO and search engine reasons it isn't a better practice to import this product image with CSS since this will make it harder to the image. You can manage both images inside the<picture>
tag and use the html to code to set when the images should change setting the devicemax-width
depending of the device (phone / computer) Here’s a guide about how to usepicture
:https://www.w3schools.com/tags/tag_picture.asp
✌️ I hope this helps you and happy coding!
Marked as helpful0 - @faha1999Posted about 2 years ago
Hello Alan Lopez Reyna, Congratulations on finishing this project. It's lovely and great on the whole! Just a little tip:
- it has responsive issues on desktop & mobile devices. Such as:
@media (max-width: 668px) { .main{ flex-direction: column; } .main__image{ height: 250px; background: url('../images/image-product-mobile.jpg') no-repeat center center / cover; } }
- desktop image
.main__image { background-image: url(../images/image-product-desktop.jpg); width: 21.6em; background-size: cover; }
and so on.
so, I made a pull request to the repo. Check it out.
I hope this helps you. 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