Responsive Landing Page Using CSS Flexbox
Design comparison
Solution retrospective
Where/when should display: flex; be used? In the parent container Or on the child/children container.
Community feedback
- @tarek008Posted almost 2 years ago
Hello there! 👋
Congrats for completing the challenge! 🙌
flex container is always the parent and a flex item is always the child. Flex properties work only within this relationship.
Descendants of a flex container beyond the children are not part of flex layout and will not accept flex properties.
You will always need to apply display: flex or display: inline-flex to a parent in order to apply flex properties to the child.
There are certain flex properties that apply only to flex containers (e.g., justify-content, flex-wrap and flex-direction), and there are certain flex properties that apply only to flex items (e.g., align-self, flex-grow and flex).
However, flex items can also be flex containers. In such cases the element can accept all flex properties. Being that each property performs a different function, there is no internal conflict and nothing needs to be overridden.
keep it up with the good work!
Have a nice one! 🎉✌
Marked as helpful1@VCaramesPosted almost 2 years agoWelcome to FEM @tarek008 !
As a friendly reminder, please avoid the following as it is against FEM’s policy:
- "… if it was mark it as helpful 🙏"
Which can result in your getting your account flagged and banned temporarily/permanently.
"Ask people to mark your comment as helpful — A big part of Frontend Mentor is helping each other out and providing feedback. If you give some feedback, please avoid saying things like, "if you found this feedback useful, please mark this comment as helpful". It places unnecessary pressure on the solution author to mark your comment as helpful, which is best avoided. Feel free to say something like, "I hope you find this helpful", but please avoid asking for your comment to be marked as helpful outright."
The goal of providing feedback is to help individuals learn and grow as developers; not about gaining points.
Thank you for contributing to the FEM community!
Happy Coding!🎄🎁
2 - @vanzasetiaPosted almost 2 years ago
Hi!
One suggestion I have is to improve the alternative text of the QR code. It should tell the users about the QR code. In this case, it will navigate the users to https://www.frontendmentor.io. So, the better alternative text can be "QR code to frontendmentor.io".
Another suggestion is to avoid using
px
unit for font sizes. Userem
orem
instead. Relative units such asrem
andem
can adapt when the users change the browser's font size setting. Here are some learning resources:- rem vs em Units in CSS | DigitalOcean
- The Surprising Truth About Pixels and Accessibility: should I use pixels or rems?
I hope this helps. Happy coding!
Marked as helpful0
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