Design comparison
Solution retrospective
Hello Everyone! π
I'm very happy to finish my second challenge here at Frontend Mentor! π
During development I was able to practice my CSS skills a lot. It was really nice to learn more and get used to coding in this language, which is essential for the frontend stack.
Well, I have a few questions to ask you guys:
- How can I make a parent the same height as the child?
- How can I vertically center elements inside a inline-block div?
I thank you for the attention!
Community feedback
- @bastianonofreiPosted about 2 years ago
Hello , welcome to the frontendmentor community. I am new also here, just a junior dev, trying to learn frontend, so we are in the same boat. From what I have seen in your live design there are quite some issues with the mobile design for 375 px. look in inspector --> Iphone SE / Iphone XR
For the first question, this is the same question I have encountered while doing this challenge. The answer should be : set your parent container's height to max-content. .parent{ height:max-content. }
For the second question I am not really sure why you want that. Can you detail a bit? Where do you want to use it?
0 - @asmaa-elfatayryPosted about 2 years ago
Hi, Tullio
congratulation to finish the challenge
1- I think you should give the width to the parent first and then give the child width:100% to take the same width as the parent
2- to center elements vertically there are many ways :
https://www.w3docs.com/snippets/css/how-to-vertically-align-inline-inline-block-elements.html
https://tahsch.industrialmill.com/frequently-asked-questions/how-do-i-center-an-inline-block-element-in-css
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