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.
Note: Delete this note and update the table of contents based on what sections you keep.
- Semantic HTML5 markup
- CSS custom properties
- Flexbox
- Mobile-first workflow
The biggest take away was learning @media. I added @media for tablet, in addition to the required desktop view. I think I did it correctly, but possibly used more code then necessary.
/* Tablet */
@media screen and (min-width: 600px) and (max-width: 999px) {
.card {
max-width: 45vw;
}
h2 {
padding-inline: 0.09rem;
}
p {
padding-inline: 0.4rem;
}
}
/* Desktop */
@media screen and (min-width: 1000px) and (max-width: 1900px) {
.card {
max-width: 20vw;
}
h2 {
padding-inline: 0.09rem;
}
p {
padding-inline: 0.8em;
}
I definitely need to continue to learn and understand how to align containers and content. I spent the most time making small adjustments by guessing.
- resource 1 - w3schools was a big help in figuring out how to align and size my container. Also, helped me understand @media and create my breakpoints.
- Website - Nick Talvy
- Frontend Mentor - @NickTalvy
Thank you w3schools!