
Advice generator app | Vanilla JS | HTML/CSS
Design comparison
Solution retrospective
I had to work so much on centering the button and making it stick when the content changes (more or less) and also on different screen sizes.
I would like to have some pointers on resizing the svg images especially for smaller screen sizes below 320px.
Community feedback
- @katjadanilovaPosted over 2 years ago
Hi!
You've done a good job here! Here is how you can center the button to always stick when the content changes:
- add
display: flex
,flex-direction: column
, andalign-items: center
to your .card class. This will help the button and all other elements always be in the center. - your .dice class then could have
bottom: -26px
instead of having left and right properties and positive value for bottom. Negative bottom will help the dice to preserve its position whenever the card size changes.
Aside from that, I would recommend to have all of the paddings set to 2em in your .card class. Having your left and right paddings set to 0 right now affects UI when quote text is long.
I hope it helps!
Marked as helpful0@syntaCorpPosted over 2 years ago@katjadanilova I really appreciate your response and have taken note of it. I would implement it in my project
0 - add
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