Design comparison
SolutionDesign
Solution retrospective
I have a question
- in this case is it better to use background-size cover or background-size contain? or should i input width and height manually ?
- should i make the overflow hidden on the scrollbar or let the scrollbar visible? Any feedback inside or outside of my question is very welcome, i want to learn more, thanks in advice
Community feedback
- @MelvinAguilarPosted almost 2 years ago
Hi @eldoragon ๐, good job completing this challenge! ๐
I have some suggestions you might consider to improve your code:
Regarding your questions:
- should i make the overflow hidden on the scrollbar or let the scrollbar visible? - It is not recommended to use "overflow: hidden" in the body element, since if the component grows, scrolling will be impossible, and you will run the risk of the component being cut off on small screens.
One solution is to use padding instead of margin in the body element.
padding: 1.25rem;
instead ofmargin: 1.25rem;
Here is another suggestion
- In this challenge, the picture tag is not needed, since the image does not need to change depending on the viewport. This is necessary when the platform provides two or more images, for example, one for mobile and one for desktop. You can directly use the image tag in this solution.
Above all, the project is done well๐. I hope those tips will help you! ๐
Good job, and 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