Design comparison
Solution retrospective
Always open for suggestions on how to improve my code!
Community feedback
- @MelvinAguilarPosted over 1 year ago
Hello there π. Good job on completing the challenge !
I have some suggestions about your code that might interest you.
HTML π·οΈ:
- The
<picture>
tag can be useful when you need to provide different images for different viewports, but in this specific challenge, it's not necessary. You can directly use the<img>
tag to include the image in your solution.
-
The
<article>
tag is used to mark up self-contained, independent content that makes sense on its own and can be syndicated or shared on its own. This allows the content to be understood by users even when it is viewed outside of the context of the original website.In summary, in your solution there is no need to add any <article> tag.
CSS π¨:
- Using both
min-width
andmax-width
with the same value doesn't make sense, there is no value between those values, so it is the same as usingwidth
. The only one that should exist ismax-width
and not both.
- Use
min-height: 100vh
instead ofheight
. Setting the height to 100vh may result in the component being cut off on smaller screens, such as a mobile phone in landscape orientation.
CSS Reset π:
-
You should use a CSS reset. A CSS reset is a set of CSS rules that are applied to a webpage in order to remove the default styling of different browsers.
CSS resets that are widely used:
I hope you find it useful! π Above all, the solution you submitted is great!
Happy coding!
Marked as helpful1@mortalcodePosted over 1 year ago@MelvinAguilar Thankyou so much for taking time, going through my code and suggesting these amazing points. really helpful!
0 - The
- @HassiaiPosted over 1 year ago
Change the value of the background-size to contain instead of cover.
To center .main-body on the page using grid, replace the height in the body with min-height:100vh and align-items with align-content. for more on thisClick here
For a responsive content, there is no need for min-width in .main-body.
In the media query you only have to change the background-image of the body.
Hope am helpful.
Well done for completing this challenge. HAPPY CODING
Marked as helpful1@mortalcodePosted over 1 year ago@Hassiai I'm grateful for you time and effort, really helpful! Thankyou
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