Single price grid component (Sass, flexbox, mobile first)
Design comparison
Solution retrospective
Hi :) I had no some great difficulties with this but have the usual doubts is the code clear enough and how could I improve it. I tried to add some interactivity in the desktop view.
Community feedback
- @PhoenixDev22Posted almost 3 years ago
@strosi For your question , some
padding
for thebody
or<div class="wrapper">
will do .Great work!
Marked as helpful0@strosiPosted almost 3 years ago@PhoenixDev22 thanks :) I was thinking of
padding
orwidth: 90vw
may be... I'll see next time :)1 - @denieldenPosted almost 3 years ago
Hi Rosi, congrats on completing this challenge! Code is very clean ;)
I had a look at your solution and I have a few suggestions to improve your code:
- Remove all
margin
from.wrapper
and.card
classes... with flex in the parent container are superfluous - Now for center the card give the follow properties to the
main
tag:
justify-content: center; align-items: center;
Overall you did well :) keep it up
And Happy coding! ;)
Marked as helpful0@strosiPosted almost 3 years agoThank you for the feedback @denielden.
- I'm testing different ways of centering content in flex container and was thinking that
justify-content: center; align-items: center;
applied to the parent do the same asmargin: auto
applied to the child (if it a single one). - If I remove the
margin
from the.card
how to put a space around the element in mobile veiw?
1 - Remove all
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