
Design comparison
Solution retrospective
Well i enjoyed making this as a revision project and helped me clear more concepts.
What challenges did you encounter, and how did you overcome them?it was easy to make as i have pracitced several layouts just responsive is something i need to focus on more.
What specific areas of your project would you like help with?well mostly how to approach and think about responsiveness before making the whole project.
Community feedback
- @PropowershellPosted 3 months ago
Hello, nice looking component but it could be better. A way to think about responsiveness is to begin with a mobile-first approach:
Start by writing your CSS for mobile devices and then use media queries to add in styling for larger screen sizes.
Test the design on mobile devices to ensure it works well.
You could also minimize your browser window to about 25% of your computer screen while coding.
To fix the current state of your qr component follow these instructions:
HTML:
Every webpage needs a <main> that wraps all of the content, except for <header> and footer>. This is vital for accessibility, as it helps screen readers identify a page's "main" section. Wrap the card in a <main>.
Besides for the card, you don't need any divs in this challenge, so I would simplify your HTML structure to this:
<main> <div> <img> <h2></h2> <p></p> </div> </main> The alt text must also say where it leads(the frontendmentor website). A good alt text would be "QR code leading to the Frontend Mentor website."Headings should always be in order, so you never start with a <h3>. I would change the heading to a <h2> - a page should only have one <h1>, reserved for the main heading. As this is a card heading, it would likely not be the main heading on a page with several components.
CSS:
Use the style guide to find the correct background-color.
Remember to specify a fallback font:font-family: 'Outfit', sans-serif;.
I like to add 1rem of padding on the body, to ensure the card doesn't touch the edges on small screens.
Remove the margin on the card.
To center the card vertically, add min-height: 100svh and justify-content: center on the body.
Remove all widths in px.
Add a max-width of around 20rem on the card, to prevent it from getting too wide on larger screens.
line-height and letter-spacing should not be in px. Use % for the line height and em for the letter spacing, where 1em equals the font size of the element.
Paragraphs have a default value of font-weight: 400, so there is no need to declare it.
On the image, add display: block and max-width: 100% - the max-width prevents it from overflowing its container.
Marked as helpful1 - P@MatFrat95Posted 3 months ago
Hey, I had big problem with responsive design (and still have some), I recommend you Kevin Powell 21-day challenge (Conquering Responsive Layouts). Access is free and you will for sure find some answers.
Great project btw, you can try to make it looks more like a design one by changing background color and adjusting paddings and font sizes.
Good luck with next challenges
Marked as helpful1
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