Design comparison
Solution retrospective
Anyone with a different approach of aligning div to center, I'd appreciate a reply from you. General feedback is welcome too.
Community feedback
- @kirtymeenaPosted over 2 years ago
Hi, you did a great job with this one, just a few issues
-
the layout is touching the right and left boundary for small screens. You can write media queries for small screens.
-
you can use a flex-box to center a div.
` .row { min-height: 100vh;
display: flex; justify-content: center; align-items: center; }
`
You can read about flexbox here https://css-tricks.com/snippets/css/a-guide-to-flexbox/
keep coding 👍.
0 -
- @SujitAdrojaPosted over 2 years ago
You can also do display :flex; justify-content : center; in body tag
0 - @apuntesnavarretePosted over 2 years ago
your solution is great but 1)you can use display: flex; justify-content: center; align-items: center; in the parent container 2)use semantic tag <main> 3)use files separated for HTML y CSS
0@Tessie475Posted over 2 years ago@apuntesnavarrete thanks..I use bootstrap that's why I can't have separate html and css files
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