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

Not responsive, using of Flexbox

Val Ery 40

@Valeryio

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


I found difficult the building of the mobile version, and make the responsive of the challenge

I want to know which best practices could help me to code the mobile part of the project.

Community feedback

@animeshanand1

Posted

You can try implementing for the desktop version first and then at the final stage you can use the media query for the mobile/tab size screen (by adding width props).

Marked as helpful

1

Val Ery 40

@Valeryio

Posted

@animeshanand1 Yeah, that's a good idea, but I don't know how to know size of the screen to make it properly with the design comparison's screen !

1

@animeshanand1

Posted

@Valeryio ok for the mobile size you can set max-width to 768px and minimum width if required set it to 350aproximately(though it's hard to find these days display of the mobile is getting bigger) and try styling accordingly like changing flex property or the grid frequency etc.

0
Val Ery 40

@Valeryio

Posted

@animeshanand1 Alright ! I'll try Thanks !

0
Lucas 👾 104,440

@correlucas

Posted

👾Hello @Valeryio, Congratulations on completing this challenge!

1.Add the correct size to avoid the container growing more than it should. In this case the QR CODE component size is max-width: 320px.

2.Use <main> instead of <div> to wrap the card container. This way you show that this is the main block of content and also replace the div with a semantic tag.

3.Replace the <div> containing the main title with <h1> note that this title is the main heading for this page and every page needs one h1 to show which is the most important heading. Use the sequence h1 h2 h3 h4 h5 to show the hierarchy of your titles in level of importance, never jump a level.

4.The html structure is fine and works, but you can reduce at least 20% of your code cleaning the unnecessary elements, you start cleaning it by removing some unnecessary <div>. For this solution you wrap everything inside a single block of content using <div> or <main> (better option for accessibility) and put inside the whole content <img> / <h1> and <p>.

<body>
<main>
<img src="./images/image-qr-code.png" alt="Qr Code Image" >
 <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>
</main>
</body>

✌️ I hope this helps you and happy coding!

Marked as helpful

0

Val Ery 40

@Valeryio

Posted

@correlucas I'm very glad to get your advice, I will use your suggestions to make my code cleaner and more useful. Thanks for your reply, Lucas! Hope the result will be better!

0
Val Ery 40

@Valeryio

Posted

@correlucas I have a question for you. When should I use the property background-image instead of the tag the tag <img>?

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