Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

QR Code component using Flexbox

P

@chadelofson

Desktop design screenshot for the QR code component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


What are you most proud of, and what would you do differently next time?

I am in the learning path, no changes have been made

What challenges did you encounter, and how did you overcome them?

base layout was challenging at the time and I found that I could make the body a flexbox

What specific areas of your project would you like help with?

At this point none. I think I got all of the feedback I needed

Community feedback

_nehal💎 6,710

@NehalSahu8055

Posted

Hello Coder 👋.

Congratulations on successfully completing the challenge! 🎉

Few suggestions regarding design.

  • Remove margins from <main> as it will not dynamically center the card.

  • To properly center the card

  • USING FLEXBOX

body{
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
  • Every site must have one h1 element describing the main content of the page.

  • So, Add a level-one heading instead of h3 to improve accessibility.

  • <h1>Improve you frontend skills by building projects</h1>

  • Use Semantics for the proper design of your code.

<body>
<main>...</main>
<footer>...</footer>
wrap up `.attribtution` div inside your footer.
</body>
  • For non-decorative images give meaningful and descriptive alt like alt= "QR code to frontend mentor website".

  • Use responsive units(rem, em, %) from next project. Explore respective use cases on google.

  • Replace width with max-width to make your card more responsive.

link.

I hope you find this helpful.

Happy coding😄

Marked as helpful

1

@samaelwebdev

Posted

When it comes to laying out HTML elements on a website, you have two excellent options: CSS flexbox and CSS grid. Both are powerful tools that offer different approaches to layout, and they are both great choices. Let me explain why, including the benefits of responsiveness.

CSS Flexbox:

Flexible one-dimensional layout: Flexbox is designed for one-dimensional layouts, making it perfect for arranging elements horizontally or vertically. It provides a simple and intuitive way to control the positioning, alignment, and order of elements within a container. Easy to understand and use: Flexbox has a straightforward syntax, making it relatively easy to grasp and implement. You can define a flex container with display: flex and apply various properties like justify-content and align-items to control how elements are distributed and aligned. This simplicity makes it an excellent choice for beginners. Responsive by default: Flexbox automatically adjusts the size and position of elements based on the available space. This inherent responsiveness means that elements can adapt to different screen sizes and orientations without requiring complex media queries. It saves time and simplifies the process of creating responsive designs.

CSS Grid:

Two-dimensional grid layout: CSS grid provides a powerful system for creating two-dimensional layouts. It allows you to define rows and columns and place elements within grid cells, providing precise control over the positioning and alignment of elements. Complex and versatile layouts: Grid is particularly useful when creating complex layouts with multiple elements. It enables you to define the explicit structure of rows and columns, control the spacing between cells, and even overlap elements if needed. This versatility makes it a great choice for building grid-based designs like image galleries or magazine layouts. Responsive design control: CSS grid provides powerful responsiveness features. By combining grid properties with media queries, you can modify the grid structure, change the placement of elements, and control the sizing and spacing at different breakpoints. This allows you to create adaptive layouts that adjust seamlessly to various screen sizes and devices.

In summary, both CSS flexbox and CSS grid are fantastic options for laying out HTML elements on a website. Flexbox is ideal for simple one-dimensional layouts and offers inherent responsiveness. Grid, on the other hand, excels in creating complex, two-dimensional layouts and provides fine-grained control over positioning. Both systems can be combined and leveraged based on the specific needs of your project, ensuring that your layout is not only visually appealing but also responsive and adaptable to different devices and screen sizes.

I will provide you with links to both W3Schools and MDN Web Docs, which will show you exactly how CSS flexbox and grid work. Additionally, I will share links to guides on using them in case you prefer practical instructions instead of reading all the theory, although I suggest you do so regardless. I also recommend bookmarking the provided website and saving them in a folder for future reference. I hope this assistance proves helpful, my friend. Good luck and happy coding!

GRID LINKS:

CSS Grid W3Schools link - https://www.w3schools.com/css/css_grid.asp

CSS Grid MDN Web Docs link - https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout

CSS Grid Guide - https://grid.malven.co/

FLEXBOX LINKS:

CSS Flexbox W3Schools link - https://www.w3schools.com/csS/css3_flexbox.asp

CSS Flexbox MDN Web Docs link - https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Flexbox

CSS Flexbox Guide - https://flexbox.malven.co/

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord