Design comparison
Solution retrospective
I'm particularly proud of successfully implementing a responsive layout using Flexbox. It was satisfying to see how the design adapted seamlessly to different screen sizes. Additionally, I was able to use CSS custom properties effectively for easier color management throughout the project.
Next time, I would focus more on enhancing accessibility features, such as adding ARIA labels and improving keyboard navigation. I’d also like to explore using CSS Grid for more complex layouts and experiment with different layout techniques to gain more flexibility in design.
What challenges did you encounter, and how did you overcome them?One of the main challenges I faced was centering the QR code card on the page while maintaining consistent spacing on all screen sizes. Initially, I struggled with ensuring the card remained responsive without breaking the layout.
I overcame this by using Flexbox to align and justify the content centrally, which allowed the card to stay perfectly centered across different viewport sizes. Additionally, I tweaked the padding and margin settings until the spacing felt just right.
What specific areas of your project would you like help with?-Text Overflow and Wrapping: I’d like feedback on how to better handle text wrapping within the card to avoid overflow without increasing the card’s width.
-Box Shadow Effect: I used a box-shadow effect on the card but would love to know how to make it appear more subtle and natural.
-Accessibility Improvements: Any suggestions on how to make the QR code component more accessible for users relying on screen readers would be greatly appreciated.
-Mobile Responsiveness: While the layout is responsive, I'd appreciate feedback on improving the look and feel on smaller devices, especially in terms of spacing and padding.
-Figma Design System: This was my first time using Figma, and I couldn’t find the exact margin values for the card component in the design system. Any guidance on how to properly extract such details in Figma would be helpful.
-CSS Grid: I wanted to try using CSS Grid but couldn’t figure out how to incorporate it into this project. Any tips or examples of how to use it effectively in this layout would be appreciated.
Community feedback
- @StroudyPosted about 1 month ago
Exceptional work! You’re showing great skill here. I’ve got a couple of minor suggestions that could make this stand out even more…
-
Using a
<main>
tag inside the<body>
of your HTML is a best practice because it clearly identifies the main content of your page. This helps with accessibility and improves how search engines understand your content. -
Overusing
<div>
tags, known as "divitis," leads to cluttered code, poor semantics, and reduced performance. Instead, use appropriate semantic elements (like<header>
,<section>
, etc.) to improve readability, accessibility, and SEO. Keep HTML clean and minimal to ensure maintainability, scalability, and better CSS structure.
<div class="card"> <div class="image"> <img src="images/image-qr-code.png" alt="Qr code"> </div> <div class="text"> <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> </div> </div>
-
Using a full modern CSS reset is beneficial because it removes default browser styling, creating a consistent starting point for your design across all browsers. It helps avoid unexpected layout issues and makes your styles more predictable, ensuring a uniform appearance on different devices and platforms, check out this site for a Full modern reset
-
While
px
is useful for precise, fixed sizing, such asborder-width
,border-radius
,inline-padding
, and<img>
sizes, it has limitations. Pixels don't scale well with user settings or adapt to different devices, which can negatively impact accessibility and responsiveness. For example, usingpx
for font sizes can make text harder to read on some screens, Check this article why font-size must NEVER be in pixels. In contrast, relative units likerem
and adjust based on the user’s preferences and device settings, making your design more flexible and accessible. Usepx
where exact sizing is needed, but prefer relative units for scalable layouts. If you want a deeper explanation watch this video by Kevin Powell CSS em and rem explained. Another great resource I found useful is this px to rem converter based on the default font-size of 16 pixel. -
Line height is usually unitless to scale proportionally with the font size, keeping text readable across different devices. Best practice is to use a unitless value like
1.5
for flexibility. Avoid using fixed units likepx
or%
, as they don't adapt well to changes in font size or layout.
I hope you’re finding this guidance useful! Keep refining your skills and tackling new challenges with confidence. You’re making great progress—stay motivated and keep coding with enthusiasm! 💻
Marked as helpful1@stephany247Posted about 1 month ago@Stroudy, Thank you so much for the thoughtful and detailed feedback. I really appreciate the time you took to review my code and suggest improvements.
I especially loved that you linked helpful resources, it’s great to have those to dive deeper into topics like semantic HTML, CSS resets, and using relative units like rem and em for better scalability. I’ll definitely be checking out the video from Kevin Powell and the px to rem converter you mentioned!
Your suggestion on using a <main> tag and reducing “divitis” makes a lot of sense, and I’m already seeing how incorporating more semantic elements can improve the structure of my code. I’ll also start implementing a modern CSS reset to avoid those pesky browser defaults.
Thanks again for all the advice and encouragement, it’s feedback like this that really motivates me to keep improving. Looking forward to applying your tips and refining my skills even more! 💻🚀
1@StroudyPosted about 1 month agoHey @stephany247, What a lovely and thoughtful response, Thank you for letting me know it was helpful, I am happy you are onboarding this feedback, If I could give you a tip, Review other people's code where you have completed the challenge, Compare your code to there and give feedback, This is apart of the learning journey, It will help you loads.
1 -
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