Advice generator app using React and tailwind css
Design comparison
Community feedback
- @DanijelAdrinekPosted 7 months ago
why did you add a width of 90 to the card, when you gave the root element the exact width that the card should be?
0@SahulhameeduPosted 7 months ago@DanijelAdrinek For the responsive mobile view. If it goes to mobile view, it will automatically shrink and give a responsive view. Is it the wrong approach feel free to say. Thank you for commenting and helping me to improve my code knowledge
0@DanijelAdrinekPosted 7 months ago@Sahulhameedu yeah, its not a good approach for 2 reasons,
-
the width of your element doesnt match the width on the design only because of the width of 90%
-
if you already have an element with the same width as that the card should be, it is probably smarter to manipulate that element to be the same size as the design on both mobile and desktop than to give its children widths of 90% and so on...
Marked as helpful0 -
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