Design comparison
Solution retrospective
In the QR code component challenge, here's a breakdown of my experience:
What I'm most proud of:- Styling the image: I successfully centered the QR code image using CSS Flexbox, which really helped me understand how to manage layout.
- Linking custom fonts: I learned how to link Google Fonts into the project and apply them using CSS, enhancing the overall design.
- Mobile-first approach: Implementing the mobile-first workflow allowed the page to scale well across different screen sizes, which was new for me and felt like a big win.
- More structured CSS: Next time, I would like to organize my CSS better, perhaps by using a methodology like BEM (Block Element Modifier) to create more maintainable code.
- Additional breakpoints: While I focused on mobile-first design, I realize I could add more media queries to better optimize the layout for tablets and large screens.
- Experiment with CSS Grid: Although I used Flexbox for this project, I would explore CSS Grid more deeply in future projects to see how it compares for complex layouts.
This challenge was a great opportunity to build upon foundational skills, and I’m excited to keep improving.
What challenges did you encounter, and how did you overcome them? Challenges I encountered:-
Centering the QR code component:
- Problem: Initially, I struggled to center the QR code component both vertically and horizontally on the page.
- Solution: I used Flexbox properties (
display: flex;
,align-items: center;
,justify-content: center;
) and set theheight
of the body to100vh
, which allowed me to align the content perfectly in the middle of the screen.
-
Styling the image:
- Problem: Ensuring the image was responsive while maintaining its aspect ratio was tricky. The image would stretch or not resize properly.
- Solution: I used
width: 100%
and set amax-width
for the container, which ensured that the image scaled properly without distortion.
-
Custom fonts:
- Problem: I had trouble importing and applying a custom font from Google Fonts.
- Solution: After reviewing the documentation and articles, I learned to use the
@import
or `` method in the HTML to properly load the font, and applied it withfont-family: 'Outfit', sans-serif;
in my CSS.
- I spent time reading documentation and experimenting with different CSS properties to get the layout right.
- I also sought feedback and tips from the developer community, which helped me approach problems from new angles.
- Learning by trial and error, and debugging with browser developer tools, was crucial in overcoming these challenges.
These hurdles were great learning opportunities, pushing me to explore more about layout techniques and responsive design!
What specific areas of your project would you like help with?Here are some specific areas of my project where I'd like help:
-
CSS Optimization:
- I'd love feedback on how to better structure my CSS for readability and maintainability. Are there best practices or methodologies (like BEM) that would be useful for a project like this?
-
Responsive Design:
- While I used a mobile-first approach, I’m unsure if I’ve optimized the design well for larger screens, especially tablets. Any advice on improving responsiveness across multiple breakpoints would be helpful.
-
CSS Grid:
- Although I used Flexbox, I’d like to explore using CSS Grid for more complex layouts in the future. Could someone point me to resources or give advice on when Grid might be better than Flexbox for such projects?
-
Accessibility:
- I want to ensure that my project is accessible to users of all abilities. Are there any accessibility issues that I may have overlooked, and how can I improve that aspect of my code?
These areas are where I’d appreciate feedback or guidance to help me grow as a front-end developer!
Community feedback
- @StroudyPosted about 2 months ago
Amazing job with this! You’re making fantastic progress. Here are some small tweaks that might take your solution to the next level…
-
This does not matter that much at this stage but something to be mindful of for SEO(Search Engine Optimisation),
<meta>
description tag missing that helps search engine determine what the page is about, Something like this<meta name="description" content="description goes here" />
-
Using a full modern CSS reset is beneficial because it removes default browser styling, creating a consistent starting point for your design across all browsers. It helps avoid unexpected layout issues and makes your styles more predictable, ensuring a uniform appearance on different devices and platforms, check out this site for a Full modern reset
-
For future project, You could download and host your own fonts using
@font-face
improves website performance by reducing external requests, provides more control over font usage, ensures consistency across browsers, enhances offline availability, and avoids potential issues if third-party font services become unavailable. Place to get .woff2 fonts -
I think you can benefit from using a naming convention like BEM (Block, Element, Modifier) is beneficial because it makes your CSS more organized, readable, and easier to maintain. BEM helps you clearly understand the purpose of each class, avoid naming conflicts, and create reusable components, leading to a more scalable codebase. For more details BEM,
You’re doing fantastic! I hope these tips help you as you continue your coding journey. Stay curious and keep experimenting—every challenge is an opportunity to learn. Have fun, and keep coding with confidence! 🌟
Marked as helpful1@ChantalNgwenyaPosted about 2 months ago@Stroudy Thank you so much for the feedback.
1@StroudyPosted about 2 months agoHey @ChantalNgwenya, No problem, You got this 💪
1 -
- @MikDra1Posted about 2 months ago
If you want to make your card responsive with ease you can use this technique:
.card { width: 90%; max-width: 37.5rem; }
On the smaller screens card will be 90% of the parent (here body), but as soon as the card will be 37.5rem (600px) it will lock with this size.
Also to put the card in the center I advise you to use this code snippet:
.container { display: grid; place-items: center; }
Hope you found this comment helpful 💗💗💗
Good job and keep going 😁😊😉
Marked as helpful1@ChantalNgwenyaPosted about 2 months ago@MikDra1 Thank you so much for such an informative feedback
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