Design comparison
Community feedback
- @MelvinAguilarPosted almost 2 years ago
Hello there π. Good job on completing the challenge !
I have some suggestions about your code that might interest you.
HTML π·οΈ:
-
The <div> tag can be useful for styling and positioning, but it doesn't convey any semantic meaning.
-
Instead, consider using more semantic elements like <p> to better describe the type of content. e.g.:
<p>A floral, solar and voluptuous interpretation composed by Olivier Polge, Perfumer-Creator for the House of CHANEL.</p>
.
- The
<h1>
is the most important heading on the page, In this challenge the perfumer's name can be considered like the title of the page, so it should be the<h1>
-
-
You can use the
<picture>
tag when you have different versions of the same image πΌ. Using the<picture>
tag will help you to load the correct image for the user's device saving bandwidth and improving performance. You can read more about this here π.Example:
<picture> <source media="(max-width: 460px)" srcset="./images/image-product-mobile.jpg"> <img src="./images/image-product-desktop.jpg" alt="{your alt text goes here}"> </picture>
CSS π¨:
- Instead of using pixels in font-size, use relative units like
em
orrem
. The font-size in absolute units like pixels does not scale with the user's browser settings. Resource π.
-
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.
I hope you find it useful! π
Happy coding!
Marked as helpful0@SaishSankhePosted almost 2 years ago@MelvinAguilar Thank you so much for your detailed feedback! Really appreciate it. I agree with all the points that you mentioned and I will improve on it.
Help
When I see the preview site and the "solution" side here, the fonts look different. On the preview site, I see the correct fonts but they don't seem to be correct in the solution screenshot. Do you think I might've missed something while using the fonts?
Thank you!
0@MelvinAguilarPosted almost 2 years ago@SaishSankhe Hi!!
It could be one of three things:
- The solution screenshot is not updating every time you make a change. There is a red "GENERATE NEW SCREENSHOT" button to update that screenshot, but there are only 5 free updates per month.
- If you're talking about font-size, it's a bit tricky to guess what the correct font-size is. What you could use is an extension called PerfectPixel or become a PRO member to have access to Figma designs with exact values.
- Regarding font-family, I don't see the "Montserrat" font has been imported and the <link> tag is repeated. It should be like this:
<link href="https://fonts.googleapis.com/css2?family=Fraunces:opsz,[email protected],700&family=Montserrat:wght@500;700&display=swap" rel="stylesheet">
Marked as helpful0@SaishSankhePosted almost 2 years ago@MelvinAguilar Hey!
Thank you for your reply! Yeah, I saw the "Generate new screenshot" button and used it but it seems to be generate the same screenshot. I think it might be about not correctly importing the fonts. I will fix that.
Thank you!
0 -
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