Skip to content

standwall5/qrcodesite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Information

This is a challenge present on Frontend Mentor which is about recreating a QR code display on a site.

You may access the challenge here:

You'll also find the intended look of the site in Desktop and Mobile and the stylings provided by Frontend Mentor.

Screenshots

Links

My process

I added two containers in order to center the QR code box (QR box was within the main-container div) using flexbox and a flex-direction column within the QR container.

To ensure the box fits exactly with the QR, img and QR container width were equal while height was auto. Padding was used to add the border, however, the border property can also be used.

QR image and text elements (grouped within div) were within a flex column which included a row gap value of 20 pixels.

Text elements included the values 0 (top) 10px (left and right) 20px (bottom) for its padding.

Built with

  • HTML5 markup
  • CSS custom properties
  • Flexbox

What I learned

Instead of trying to match width and height, it was better to use auto sizing and increase the padding in order to add an equal border.

Author

Credits

About

QR code site from Frontendmentor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages