Design comparison
Solution retrospective
Creating custom radio buttons.
What challenges did you encounter, and how did you overcome them?Toggling between radio buttons and input was so challenging that I spent one full hour to think about that.
What specific areas of your project would you like help with?Any feedback is appreciated
Community feedback
- @AdrianoEscarabotePosted about 1 month ago
Hi Mahmood, how are you doing? I really loved the outcome of your project, but I have a few suggestions that I think might be helpful:
Using Flexbox or Grid on the
body
to center elements ensures a more responsive and adaptive layout, fitting different screen sizes seamlessly. It avoids manual calculations and constant adjustments needed withmargin
,padding
, or absolute positioning. These techniques provide more consistent alignment and simplify the code.flexbox:
body { display: flex; justify-content: center; align-items: center; min-height: 100vh; }
grid:
body { display: grid; place-content: center; min-height: 100vh; }
The rest is excellent.
I hope you find it useful. 👍
Marked as helpful0@MahmoodHashemPosted about 1 month ago@AdrianoEscarabote Thanks for your feedback Adriano, but there is another way to center an element besides using Grid and Flexbox: using
align-content: center
on the body andmargin: auto
on the element you want to center. What are your thoughts on this approach compared to Grid and Flexbox?1@AdrianoEscarabotePosted about 1 month ago@MahmoodHashem I like to use
magin: 0 auto;
when the component I'm trying to center doesn't have a parent element, or it's an independent component, but most of the time this doesn't happen the best case is to usegrid
orflexbox
1
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