Design comparison
Solution retrospective
I am proud of my progress of responsiveness this time compared with my last project. It works very well on all sizes of devices. After this practice I am more familiar with flex.
What challenges did you encounter, and how did you overcome them?I encountered a challenge that if my font-size of the text below the image is set too small, then because of the alignment way of flex with regard to the vertical items, the text will appear higher than I expected. I solved this by just focusing on the project and not think too much. However, next time I may have finished the study of Grid, and I may try to work with both flex and grid, grid for a strict overall layout, and flex for some particular layouts or text alignment...
What specific areas of your project would you like help with?I am really confused about the alignment of a text element right after a picture. If I just want to display a text right below an image or keep their center line collinear, how can I achieve that easily? Really thankful for your advice!
Community feedback
- @AdrianoEscarabotePosted 29 days ago
Hi FatherSword, 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 helpful1
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