Design comparison
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
- @animeshanand1Posted about 2 years ago
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 helpful1@ValeryioPosted about 2 years ago@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@animeshanand1Posted about 2 years ago@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 - @correlucasPosted about 2 years ago
👾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 helpful0@ValeryioPosted about 2 years ago@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@ValeryioPosted about 2 years ago@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 GitHubJoin 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