Design comparison
SolutionDesign
Community feedback
- @SvitlanaSuslenkovaPosted 2 months ago
I see that your problem is that you don't have any sizes for your project. You can use figma to measure design images. Hope you found this comment helpful :)
Marked as helpful1@romannstPosted 2 months ago@SvitlanaSuslenkova Yes, i've been figuering out that types of tools to improve the issue of design dimensions. Thx for the comment!
0@grace-snowPosted 2 months ago@romannst I'm afraid this has lots of foundational issues. But don't worry most are very common!
- Remove all of those reload links in the head. Strip it right back. All you need to be calling in the head is the Google font links (including specific weights) and your one css file.
- Normalise is a huge and old css reset. Instead, use a shorter modern css reset at the start of your css file. Andy Bell or Josh Comeau both have good ones you can look up and use.
- This challenge does not include a header. A header landmark is for repeating primary site wide content, it doesn't go in a main. This component is just one div with an image, heading and paragraph inside. It doesn't need complicating.
- The alt text on the image needs to say what the image is (QR code) and where it goes (to FrontendMentor.io).
- Think about the context of where a component like this would be used on a real site. It would never act as the main title of a page so yiu know it wouldn't have a h1. Use a heading at a lower level of importance like h2.
- There's no need for a strong tag in the heading. It's not to be used every place where bold text is used. It's specifically for showing emphasis which isn't needed on a heading role.
- Try to keep html as simple as possible. There is no need for a div header and a section element. Again, it's just one card with an image heading and paragraph. Keep it simple and remove the extra wrapping elements. If you were going to use a section element in this it would need to be for the whole component, not for part of it.
- I recommend against using that 62.5% rem sizing hack. You really don't need it. https://fedmentor.dev/posts/rem-html-font-size-hack/.
- You don't need any media queries in this. Remove them all. I've written a post about media queries on the same site as linked previously which is worth reading before other projects. But you definitely don't need any in this challenge.
- Remove the width on the card. You don't need it. All it needs is a single max width in rem on the component.
- Nothing in this needs a height. The body or main need min-height 100svh along with flex column properties to center but nothing in this challenge needs a height anywhere. It's the browsers job to decide how tall the component needs to be.
Marked as helpful0
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