Esteban
@estebanp2022All comments
- @estebanp2022Submitted about 2 years ago@estebanp2022Posted about 2 years ago
Thank you for the feedback! I've made a few edits accordingly. I'm currently trying to use flex-box only on the layout to practice and get really comfortable with it - I will look into updating the code using Grid in the future.
TY!
0 - @luisoliverosrdnSubmitted about 2 years ago
Hey! Just finished my first challenge on FrontEndMentor but I have a question.
When I apply align-content: center to my flex container it won't align it in the middle of the page vertically. I don't know if I'm missing something or using a wrong attribute for what I'm trying to do.
My solution to make it look somewhat in the middle was to apply a margin-top to the container but I don't know if this is a good way to do it or not.
I will very much appreciate the feedback.
Thanks! :)
@estebanp2022Posted about 2 years agoI come across the same problem (not sure what I'm missing). I fix it by using the Transform/Translate properties and this works every time. Just include the following on the selector of whatever you're trying to center both vertically & horizontally:
position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
Hope this helps!
0