Design comparison
Community feedback
- @danielmrz-devPosted 11 months ago
Hello @lekkaaudisy!
Your solution looks excellent!
About your question:
-There's something different with the white container that I made, it's look smaller than the challenges. There's some white space below the subtitle in the challenges. How can I edit that so it will look similar?
You can just increase the
.container
padding-bottom. This is your code:.container { background-color: hsl(0, 0%, 100%); max-width: 300px; padding: 5px; text-align: center; border-radius: 15px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); }
And here's the updated code with a little more
padding-bottom
:.container { background-color: hsl(0, 0%, 100%); max-width: 300px; padding: 5px 5px 20px 5px; /* here's the change */ text-align: center; border-radius: 15px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); }
I'm not sure if 20px is good enough, but you can test other values until you feel it's good π
I hope it helps!
Other than that, you did a great job!
Marked as helpful1@lekkaaudisyPosted 11 months agoThanks for the solution Mr. @danielmrz-dev I already added padding bottom, I totally forgot about that. It looks good now
1 - @MelvinAguilarPosted 11 months ago
Hello there π. Good job on completing the challenge !
I have some suggestions about your code that might interest you.
- You can add a
padding-bottom
of the.container
element or add amin-height
to the entire component.
- Wrap the page's whole main content in the
<main>
tag.
- You should use the
box-sizing: border-box
property to make thewidth
andheight
properties include the padding and border of the element. This will make it easier to calculate the size of an element. You can read more about this here π.
- 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! π Above all, the solution you submitted is great!
Happy coding!
Marked as helpful1@lekkaaudisyPosted 11 months agoThanks for the solution and the feedback Mr. @MelvinAguilar
I add
html { box-sizing: border-box; } *, *:before, *:after { box-sizing: inherit; }
instead box-sizing: border-box only. Is that good?
0 - You can add a
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