Centered card layout using Flexbox

Solution retrospective
I'm proud of how clean and responsive the layout turned out using only HTML and CSS. I managed to center the card perfectly on the page using Flexbox and styled the elements to match the design spec closely. I also maintained a clean, organized structure in my code with meaningful class names and a mobile-first approach.
This project helped me get more comfortable with layout techniques and responsive design.
I'd also consider implementing dark mode support or adding a small animation to make the UI feel more interactive.
What challenges did you encounter, and how did you overcome them?At first, centering the card both vertically and horizontally was tricky. I tried using margins but it didn’t work consistently across screen sizes. ✅ Solution: I used Flexbox on the body to center the .inner_container perfectly, even on small screens.
What specific areas of your project would you like help with?I’d love feedback on whether my CSS structure and class naming follow best practices. Are there ways I can make my styles more modular or maintainable?
While the layout looks good on mobile and desktop, I’d appreciate suggestions on how I could make the design even more responsive, or if there are better techniques I could use.
Please log in to post a comment
Log in with GitHubCommunity feedback
- P@joaoc-dev
Great work!
I would look into semantic html as a way to possibly improve your html structure: HTML Semantic Elements
I would also avoid generic css class names like
.para_1
and.para_2
Regarding naming conventions, you can look into BEM for future more complex projects: CSS BEM methodology
Marked as helpful - P@AnguiNator
Cambios recomendados: ✅ Renombrar clases usando la metodología BEM.
✅ Usar variables CSS para colores y espacios comunes.
✅ Arreglar el color mal escrito (color: 1F314F; → #1F314F).
- @zyre-mendoza
I think you already get the concept---just make sure to follow the correct spacing, margin, and padding. Follow the design :>
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