Design comparison
Solution retrospective
I'm able to create QR code. Hoping to learn more.
What challenges did you encounter, and how did you overcome them?Well! the resources provided were good and helped me.
What specific areas of your project would you like help with?In my FrontEnd development this learning will help alot.
Community feedback
- @MikDra1Posted about 2 months ago
If you want to make your card responsive with ease you can use this technique:
.card { width: 90%; max-width: 37.5rem; }
On the smaller screens card will be 90% of the parent (here body), but as soon as the card will be 37.5rem (600px) it will lock with this size.
Also to put the card in the center I advise you to use this code snippet:
.container { display: grid; place-items: center; }
Hope you found this comment helpful 💗💗💗
Good job and keep going 😁😊😉
0 - @StroudyPosted about 2 months ago
Awesome job tackling this challenge! You’re doing amazing, and I wanted to share a couple of suggestions that might help refine your approach…
-
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. -
Having a clear and descriptive
alt
text for images is important because it helps people who use screen readers understand the content, making your site more accessible. It also improves SEO, as search engines usealt
text to understand the image's context, helping your site rank better, Check this out Write helpful Alt Text to describe images, -
For future project, You could download and host your own fonts using
@font-face
improves website performance by reducing external requests, provides more control over font usage, ensures consistency across browsers, enhances offline availability, and avoids potential issues if third-party font services become unavailable. Place to get .woff2 fonts -
Developers should avoid using pixels (
px
) because they are a fixed size and don't scale well on different devices. Instead, userem
orem
, which are relative units that adjust based on user settings, making your design more flexible, responsive, and accessible. For more information check out this, Why font-size must NEVER be in pixels or this video by Kevin Powell CSS em and rem explained.- Another great resource for px to rem converter.
You’re doing fantastic! I hope these tips help you as you continue your coding journey. Stay curious and keep experimenting—every challenge is an opportunity to learn. Have fun, and keep coding with confidence! 🌟
0 -
- @geomydasPosted about 2 months ago
Hi @Kirthi-1105, your code and solution looks good but it has some few problems.
My Tips and Feedback
- Every website should have atleast 1 main tag or landmark. This is to ensure accesibility and accesibility best practices. Consider replacing the
.container
div with a main tag instead. - Apply the styles directly and only use divs when necessary. You can apply the styles on the
.card
element on the.container
element instead. Also, I don't see the need for using a margin on the .card element - Never ever set typography related properties in px! See why
- Never ever change the base font-size inside the body, html, or the :root. Article is the same as the above
- Replace some of the px unit with rem instead. Using px isn't really an accesibility issue but you should consider using rem for people who do change their font sizes in the browsers setting. The difference between rem and px is that rem scales with the users setting on the font size while px doesn't. You would typically use px for very small stuff such as outlines, borders, blurs, shadows and etc. You would typically use rem for everything else aswell.
- Use CSS variables. You can easily and better organize your colors by using this. This makes it so that your units, colors and etc. are more reusable resulting in DRY code
- Use a CSS reset You don't have to do anything special. Just copy and paste it inside your CSS and you are already good to go. It basically makes your CSS consistent across browsers and devices. I reccomend using Josh Comeau's or Andy Bell's CSS reset instead.
- Consider checking out the BEM naming convention It basically helps you write better classes inside your HTML and more maintanable CSS. It's not for everyone though as it is very verbose but I reccomend you to try it as it is one of the industry standard for CSS
- Replace the h3 tag with an h1 Self explantory. Heading levels shouldn't skip numbers and should only decrement or increment by 1. You can't use an h3 tag if there isn't a h2 tag, you can't use an h4 tag if there isn't an h3 tag and the list goes on...
- Add an alt text to the image
0 - Every website should have atleast 1 main tag or landmark. This is to ensure accesibility and accesibility best practices. Consider replacing the
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