QR Code Challenge by Mary Programms | HTML CSS
Design comparison
Solution retrospective
Hello everybody! This was my first challenge here, was a little bit confused if I should have done 2 versions - mobile and desktop - since in the figma file they both had the same measures.
I had 2 things that I couldn't do well: Situation 1: making the footer stay in it's place, no matter the screen size. Example - when I switched to another smaller size, a scrolling bar appeared.
Situation 2: margins - I learned that if two margins of elements next to each other is the same size, the margins "overlap", they don't add together - yet, on my file, they were adding to each other. Example - the bottom margin of the blue square and the top margin of the first text, they were both adding, creating a total of 48px margin, instead of 24px - is there an explanation for this? The margins shouldn't add together, right?
Not sure if this is the best way to make this text, but it was my first time! :)
Community feedback
- @hcxwebPosted almost 3 years ago
Hello Mariana,
Good job on your first challenge. I've looked at your solution and came with some ideas to help you.
Let's redo the spacing to simplify the code and make it more responsive:
- remove margins for everything (or you can comment them out for now)
- add align-items: center to body
- add padding to the qrcode class
- for the image, add max-width: 100%
- add back margin between the image and text (either margin-bottom or margin-top is fine)
- you may also use max-width on the text to control its look if need to
These should make the page responsive and you shouldn't see a scrollbar.
Let me know if you have further questions.
Marked as helpful1@mariana-c-ramosPosted almost 3 years ago@hcxweb hello Han, thank you so much for your feedback, I really appreciate it! :)
Looking at my margins again, I definitely over complicated them. Makes so much more sense using padding - same thing with the align-items, I have updated my code!
2 - @NaveenGumastePosted almost 3 years ago
Hay ! Mariana Ramos Good Job on challenge
These below mentioned tricks will help you remove any Accessibility Issues
-> Add Main tag after body
<main class="container"></main>
-> Learn more on accessibility issues
If this comment helps you then pls mark it as helpful!
Have a good day and keep coding 👍!
Marked as helpful1@mariana-c-ramosPosted almost 3 years ago@Crazimonk hello Naveen!
Thank you, I have read the link you have sent me and it helped a lot in understanding better how to make sure accessibility is present in my projects!
1 - @EmmanuelHexerPosted almost 3 years ago
Good work man, keep it up. One tip i can give you is to always add main tag and wrap the card so that you do not get accessibility issues
Marked as helpful1@mariana-c-ramosPosted almost 3 years ago@Phalcin thank you for the tip, should have payed more attention to the tags I used, I did get the heads up on the report we get - will keep an eye for accessibility in the future!
1 - @denieldenPosted almost 3 years ago
Hi Mariana, good job! Congratulations on completing the challenge.
I have some advice for you:
- Adjustments for various devices should only be made when needed ... this challenge doesn't need it.
- Margins overlap when elements have different
position
such asrelative
-fixed
. - remove all
margin
fromqrcode
class because with flex they are superfluous. - Add
main
tag and wrap the card for Accessibility
Overall you did well! Hope this help ;)
Marked as helpful1@mariana-c-ramosPosted almost 3 years ago@denielden hey and thank you so much for the feedback! :) I have understood everything you mention, and I added some more things to help in the accessibility of this project, like roles and alt tags!
1@denieldenPosted almost 3 years ago@mariana-c-ramos You are welcome! And don't forget to mark my comment as helpful :) thanks
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