CSS Variables, CSS Grid, Flexbox, and url().
Design comparison
Solution retrospective
This is my first project for Frontend Mentor. I really enjoyed it.
The biggest challenge was how to use both the desktop and mobile images at different sizes to make the website responsive. It took me a while to figure it out, but I learned a lot.
Community feedback
- @visualdennissPosted over 1 year ago
Hello Craig,
Your submission looks great! I have few more suggestions:
-to improve accessibility: line through styling alone is not enough, so you'd need to wrap the old price in an s or del element and can add visually-hidden text to make it clear thatβs the old price.
- You can make the font weight of the new price a bit bolder to match the design. Also very tiny detail, but you can remove the border from the pricing_btn, like border:none instead of border: 1px solid var(--green); for a more consistent look.
Hope you find this feedback helpful!
Marked as helpful1@craigdev937Posted over 1 year ago@visualdenniss - I'll look into that. Thanks for the tip! π
0 - @HassiaiPosted over 1 year ago
Use the colors that were given in the styleguide.md found in the zip folder you downloaded.
There is no need overflow-y in the body. To center the main on the page using flexbox or grid instead of margin, add min-height:100vh; display: flex; align-items: center: justify-content: center; or min-height:100vh; display: grid place-items: center to the body.
USING FLEXBOX: body{ min-height: 100vh; display: flex; align-items: center; justify-content: center; }
USING GRID: body{ min-height: 100vh; display: grid; place-items: center; }
Use relative units like rem or em as unit for the padding, margin, width values and preferably rem for the font-size values, instead of using px which is an absolute unit. For more on CSS units Click here
Hope am helpful.
Well done for completing this challenge. HAPPY CODING
Marked as helpful1@craigdev937Posted over 1 year ago@Hassiai - I never knew about <place-items>. Thanks for the info. π
0 - @frank-itachiPosted over 1 year ago
Hello there π. You did a good job!
- You could also use the
<picture>
tag that allows you to interchange the images depending of the viewport size. Red more about this awesome tag here
I hope you find it useful! ππ Above all, the solution you submitted is greatπ!
Happy
<coding />
π!Marked as helpful1 - You could also use the
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