Responsive using flex box

Solution retrospective
the css most especially
What challenges did you encounter, and how did you overcome them?the css most especially
What specific areas of your project would you like help with?the css most especially
Please log in to post a comment
Log in with GitHubCommunity feedback
- @o-k-harmash
💬 Personal Feedback
Hi! I'm not a production-experienced frontend developer. This commentary is more about my thoughts rather than direct recommendations.
I understand you might have many other tasks, and my comment may already be outdated by the time you read it.
📚 Some Thoughts on Structure and Styling
If you're interested, feel free to check out my GitHub or some of the links I've shared below. I'm not part of a Discord community, but we can always communicate through this platform.
I reviewed the HTML and CSS using browser Developer Tools and wanted to share a few ideas that came to mind while trying to understand and recreate the layout.
When I’ve worked on similar projects using React, I’ve realized that what I really care about is building a solid foundation with clean HTML and CSS. That’s where I like to start — getting the structure and styling right at the base level.
Of course, there are many ways to implement things, and multiple approaches can be valid at the same time. What matters most is that it makes sense to you first (hehe), and that it’s logical and semantically sound.
For learning best practices in structuring CSS, I recommend reading up on methodologies like BEM.
🌱 A Few Concepts I Use
-
Layout elements – usually
div
, used for structural containers and positioning. -
Semantic elements – like
section
,article
,figure
, etc. These improve readability for both developers and machines (like screen readers or SEO). -
Wrappers – styled containers that group content and encapsulate specific layout or styles for reuse.
📐 Positioning Elements
To center something (like in this task), I usually use a layout element with margin auto, flexbox alignment, or translate depending on what fits best.
For basic 2D alignment, flex is often enough, but grids are useful for more complex layouts.
🃏 Card Content
I wrap grouped content (like a blog card) inside a semantic or wrapper element and give it base styling such as padding. This simplifies internal layout for child elements.
💡 Some Lessons I’ve Learned
-
I’ve started using relative units (rem, em) and CSS variables, even in small projects. It helps with consistency and makes future adjustments easier (e.g., for themes or documentation).
-
I use combined selectors like
.card__body p
instead of assigning classes to every element. It feels cleaner in small to mid-size projects.
⚠️ One Tricky Issue
If a text-wrapping element is inside a flex child, it often needs an explicit
min-width: 0
or overflow rule — otherwise, text might not wrap as expected.Also, when using inline-flex elements, font size or line height might behave unexpectedly. These values don’t always inherit properly due to how layout calculations work.
🔗 Useful Links
- ChatGPT – for brainstorming or just lifting your mood 😄
- BEM Methodology – CSS naming conventions
- Learn HTML
- Learn CSS – very complete but can be overwhelming for beginners
- Text Wrapping & Flexbox – a helpful article I found
Hope this helps or inspires you in some way. Thanks for reading! ✨
— o-k-harmash -
Join 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