Design comparison
Community feedback
- @correlucasPosted about 2 years ago
👾Hello @saminstein, Congratulations on completing this challenge!
Great code and great solution! I’ve few suggestions for you that you can consider adding to your code:
The box-shadow is a bit too strong, this is due the
opacity
andblur
. The secret to create a perfect and smooth shadow is to have low values foropacity
and increaseblur
try this value instead:box-shadow: 12px 7px 20px 6px rgb(57 75 84 / 8%);
. If you’re not familiar to box-shadow you can use this site to create the shadow design and then just drop the code into the CSS: https://html-css-js.com/css/generator/box-shadow/Think about using relative units as
rem
orem
instead ofpx
to improve your performance by resizing fonts between different screens and devices. Anyhow, if we want a more accessible website, then we should use rem instead of px. REM does not just apply to font size, but to all sizes as well.✌️ I hope this helps you and happy coding!
Marked as helpful1 - @VCaramesPosted about 2 years ago
Hey @saminstein, some suggestions to improve you code:
- To fix your background, change the following:
Old:
body { background-size: 100% 50%; }
New:
body { background-size: 100%; }
-
Never use
width
on content you want to be responsive, usemax-width
. -
Add some padding to your Paragraph Text its touching the sides of your card.
-
The ** Music Icons** serves no other purpose than to be decorative; It add no value. The Alt Tag should left blank and have an aria-hidden=“true” to hides it from assistive technology.
-
Your CSS Reset is extremely bare. You want to add more to it.
-
Your "button" was created with the incorrect element. When the user clicks on the button they should directed to a different part of you site. The Anchor Tag will achieve this.
-
Same for your "Cancel Order" needs to be an Anchor Tag to redirect users to another page.
Here are few CSS Resets that you can look at and use to create your own CSS Reset or just copy and paste one that already prebuilt.
https://www.joshwcomeau.com/css/custom-css-reset/
https://meyerweb.com/eric/tools/css/reset/
http://html5doctor.com/html-5-reset-stylesheet/
- To keep your CSS code organized and easier to use, I suggest implementing CSS Variables. This will come in handy when building large websites, using light/dark mode, etc…
More Info
https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties
https://www.w3schools.com/css/css3_variables.asp
Happy Coding!
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