/qr-code-component

QR Code Component - Frontend Mentor Challenge | HTML and CSS (Flexbox)

Primary LanguageHTMLMIT LicenseMIT

Frontend Mentor - QR Code Component Solution

This is a solution to the QR code component challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of contents

Overview

This is a solution for QR code component based on the provided desktop design.

Screenshot

QR Code solution - desktop screenshot

Links

Watch demo

GitHub Repo

My process

Built with

  • semantic HTML5 markup
  • CSS custom properties
  • Flexbox

What I learned

Image and Paragraph Alignment/Spacing Issue: The initial visual misalignment between the image and the text blocks due to the different widths of these blocks, even though I was trying to center them with Flexbox. Understanding that align-items: center; centers the blocks as a whole, not their internal content if the blocks have different widths, was key.

Setting width: 100%; on the image helped to fill all available space within the card (after padding), which significantly improved visual alignment with the text.

Continued development

I plan to improve on these areas:

  • Responsive Design: use of media queries and fluid units

  • Deeper understanding of Flexbox: better understanding of already known properties

  • Figma: navigating tools, extracting infos for CSS etc.

Useful resources

-Josh W. Comeau:Interactive Guide To Flexbox

Author

Frontend Mentor - @dinruz

GitHub- @dinruz