Design comparison
Solution retrospective
below the h3, I want to extend the margin but I couldn't. I don't know why so give me some advice plz.
the div.card is smaller than the main. I want the div. card to be the same as the main.
and I want the div. section more clearly. is there any solution to clear it?
Community feedback
- @dusan-bPosted about 2 years ago
Hello Sujeong,
to add space at the bottom of the card component, you can simply add something like
padding-bottom: 20px
to the.card
class.The
main
element is taller than.card
, because theh3
element "Cancel Order" has an implicitmargin
that is computed by the user agent (browser). You can solve this problem by setting themargin
ofh3
to0
.To avoid such unexpected results, you should use a CSS reset or normalize which belongs at the very beginning of your stylesheet. I personally prefer Normalize.css, it's also recommended by MDN.
Hope this helps. Keep it up, and happy coding!
0 - @BilalSalmiPosted about 2 years ago
Hi sujeong, good job!
to extand the margin consider to use overflow css property in div.card
.card { overflow: hidden; min-height: 100%; width: 450px; text-align: center; border-radius: 20px; background-color: white; }
Keep it it!
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