Design comparison
Solution retrospective
Hello, this is my third challenge and I have a few questions regarding this challenge.
-
How do I make a bottom shadow on the button exactly as is shown in the challenge?
-
How to make the svg header image not be cropped when changing width and height?
-
How to make the 'annual plan' section be in order when resizing to a mobile screen?
Thank you
Community feedback
- @correlucasPosted over 2 years ago
Hello Daníel J., congratulations for your solution!
**Answering your questions: **
- The button box-shadow: to make the button shadow precisely like in the design files, you'll need the premium subscription to copy and paste the exact values from the Figma/Sketch. But I need to say that the worth what you pay for because the time you save is just coding and not trying to guess the design elements.
You can play around with box-shadows using this box-shadow generator tool: https://html-css-js.com/css/generator/box-shadow/
-
Image header For the image header fit the container, you can set
max-width: 100%;
anddisplay:block;
to work easily the images, then you applyoverflow:hidden;
andobject-fit:cover;
to keep the image inside the container bounds. -
Annual Plan Section for the annual plan section, you need to wrap all the content inside a div and inside this div two other divs, so the is the first element, then a div with the "annual plan" / "59..." then the link <a> change. So should be a structure like that:
<div> <img> <div> <h3><h3> <p><p><a>
then you applydisplay:flex;
to this div and change theflex-direction:row;
when your card become mobile change theflex-direction
to columns to save space inside the container.I'll let you the link to my solution, so you can see how I build it. I used the same approach I told you about in my tips:
https://www.frontendmentor.io/solutions/order-summary-component-vanilla-css-custom-wave-background-hover-tEKUwaT2id
I hope it helps you. Happy coding!
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