Design comparison
Solution retrospective
i understood that web by default is responsive and we make it unresposive by hardcoding widths and heights in px. So if we don't give any height or width then by default it's responsive. Even if you want to specify width and height always use percentages(%) so that it's responsive.
What challenges did you encounter, and how did you overcome them?Writing responsive code was quite challenging intially then i learned that using percentages instead of px solved the problem quickly. Also applying border radius to image was taking time then i learned that use parent div for it and then give width/height/border radius to it.This fixed my problem.
What specific areas of your project would you like help with?nothing as of now.
Community feedback
- @danielmrz-devPosted 4 months ago
Hey there! šš½āāļø
Congrats on completing the challenge! ā
Your project looks fantastic!
Here's a tip to make it even better:
Try this method to center the card vertically and horizontally:
š Apply this CSS to the body (skip position or margins to make it work correctly):
body { min-height: 100vh; display: flex; justify-content: center; align-items: center; }
Hope this helps!
Keep up the great work!
0@mike15395Posted 4 months ago@danielmrz-dev thanks for your feedback. But after using your code, it perfectly aligns the card at center but there is scroll in vertical, why? how to avoid it?
Awaiting reply...
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