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

Basic QR Code Challenge

@nzcastilan

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


a bit new in front end web development, Like to know if I'm using the @media properly to make the web page responsive for both mobile and desktop application or if there is a better alternative. Thanks!

Community feedback

@jrleijnse

Posted

Hey there! Great job completing your first challenge! 🎊

I have some suggestions for your code that might interest you.

HTML 📄:

  • Instead of using the <div> tag for your containers, try using some semantic HTML to provide more meaning to it, for better SEO. For example, instead of using <div> you could use the <main> or <section> tag. For the element with the classname attribution you could use the <footer> tag.
  • If an <img> like in this case the QR-code, leads to a website or links to someplace else, try to provide a more descriptive text of that in your ALT text, for example: QR code that leads to the website frontendmentor.io

CSS 🎨:

  • To make your project more responsive and adaptable (in this case as well: especially when you start building bigger and bigger projects), I would suggest to use rem instead of px. This basically means that all sizing will be calculated in relation to the root element (rem). To set the standard font-size for the root element, you can provide a font-size inside the HTML element inside your CSS. For example: html {font-size: 15px;}.

For more information on this topic, you can read the following article: PX or REM in CSS? 📘

  • An easy way to quickly and automatically center your <main> element inside the <body> of your page, is by setting the following properties onto the <body> element inside your CSS like so: body { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; }

I hope you find my suggestions useful, and above all: the solution you provided is very good!

Keep it up and happy coding! 😃

Marked as helpful

1

@nzcastilan

Posted

@jrleijnse Thanks a lot, that gave me some insight on how I"ll approach my next challenge! :)

1

@Nebil-Nej

Posted

i have seen the code and it is good, but I would not recommend a 'margin: auto;' and 'width: 100%;' for this project,as it is in the design that the qr code be center left and right, the width will make it contain all the view width. So i suggest a 'width: 90%;' with a 'margin: 0 auto;'

1

@nzcastilan

Posted

@Nebil-Nej Noted on that one, thanks a bunch!

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