Skip to content

rzho17/qr-code-frontendmentor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 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

This is my version of the QR code beginner project, I tried to replicate my design as close to the original but I added box shadow around the container.

Screenshot

Links

  • Solution URL: Here
  • Live Site URL: Here

My process

I began by planning out how to layout my html, since I felt confident I could figure out a way to lay things out I just did it without writing it down on a piece of paper.

After laying thing out how I wanted them, I began to style my design as close as possible to the original and this was the result.

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox

What I learned

The biggest thing I struggled with was wondering why my body container would not align-items center after I had used display flex. After some googling I realized the body's height was only the max height of the content which was the container image.

After adding a height of 100vh to the body and limiting the height of the container to be max content, I was able to center align the container.

<body>
  <div class="container">
    <div class="qrCode">
      <img src="images/image-qr-code.png" alt="">
    </div>
    <h1>
      Improve your front-end skills by building projects
    </h1>

    <p>
      Scan the QR code to visit Frontend Mentor and take your coding skills to the next level
    </p>
  </div>
</body>
body {

    height: 100vh;

}

.container {
  height: max-content;
}

Continued development

I still need to get more practice with learning about sizing in general with CSS and Flexbox.

Author

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published