Skip to content

albina0104/qr-code-component

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 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

Screenshots

Desktop Mobile

Links

My process

Built with

  • HTML5
  • CSS Flexbox

What I learned

When trying to center a div both vertically and horisontally with absolute positioning, or with flexbox properties justify-content: center and align-items: center - there is an issue on small screens in landscape mode. When overflow happens - the top part of the div is hidden and cannot be seen, we can scroll down, but not up to the top of the div. Moreover, with absolute positioning elements can overlap each other on small screens.

To prevent this issue, I used flexbox and the property margin: auto to center the flex item.

Note: the centered flex item is not exactly in the center because there is a second flex item with a row of text.

Useful resources

Author

About

A solution to the "QR code component" challenge on Frontend Mentor

Topics

Resources

Stars

Watchers

Forks