Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

QR Code COmponent

@NkululekoCyrilCele

Desktop design screenshot for the QR code component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


What are you most proud of, and what would you do differently next time?

I’m most proud of successfully replicating Bootstrap-like functionality using pure CSS. It allowed me to maintain complete control over the layout and styling without relying on external libraries, which kept the project lightweight. I also took a mobile-first approach, ensuring the component was fully responsive, which is critical for modern web development.

Next time, I would experiment more with CSS methodologies like BEM (Block, Element, Modifier) to further improve the organization of my CSS. This could make it easier to maintain and scale the project, especially if additional features or components are added in the future.

What challenges did you encounter, and how did you overcome them?

One of the main challenges was centering the QR code component both vertically and horizontally within the viewport without using Bootstrap's d-flex or vh-100 classes. I solved this by leveraging flexbox and manually writing the necessary CSS to achieve the same effect.

Another challenge was ensuring the design was both minimalistic and visually appealing across a range of devices. This required careful adjustments in my media queries to ensure the component looked just as good on a mobile screen as it did on larger desktop resolutions.

What specific areas of your project would you like help with?

CSS Structuring: I would appreciate feedback on how I can further improve the structure and organization of my CSS code. Are there specific methodologies or techniques that could make my CSS more modular and easier to maintain?

Accessibility Enhancements: While I used semantic HTML, I’d love to get advice on improving accessibility, particularly for screen readers. What additional ARIA attributes or semantic tags could enhance the experience for users with disabilities?

Design Consistency: I focused on maintaining a clean, simple design, but I would like feedback on how I could enhance visual hierarchy and balance between text and images. Are there specific design techniques that could improve the visual appeal without making the design too complex?

Community feedback

T
Grace 30,650

@grace-snow

Posted

Just a few quick recommendations:

  1. Set the max width on the card in rem not px. That way the layout will scale for all users nicely including those with a different default text size setting.
  2. This card would never be used to serve the main heading on a page. So it shouldn't have a h1. Give it a lower importance heading level like h2 instead.
  3. The image alt should be more descriptive. As well as saying what the image is ("QR Code") include where it goes ("to FrontEndMentor.io").
  4. Don't set the html height to 100% like this! It will cause the content to overflow badly on small screens. Instead, set the body min-height to 100svh (or vh).
  5. Get into the habit of including a full modern CSS reset at the start of the styles in every project. Look up Andy Bell's or Josh Comeau's and read about why they've included what they have. It's a good habit to get into straight away.
  6. Try to avoid ever setting font size in px. Use rem so it will scale properly for everyone (see https://fedmentor.dev/posts/font-size-px/ for more info).

Marked as helpful

1

@NkululekoCyrilCele

Posted

@grace-snow Thank you for the feedback. It's really helpful and eye-opening.

0

Please log in to post a comment

Log in with GitHub
Discord logo

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