Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Responsive Grid Card

P

@XenoMee

Desktop design screenshot for the Single price grid component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Hello ๐Ÿ‘‹! I'm Adrian and this is my solution for this challenge.

1.๐Ÿ”จBuilt with:

  • Semantic HTML
  • CSS Reset
  • CSS Custom Properties
  • CSS Grid and Flexbox
  • Utility classes
  • Mobile-First Approach๐Ÿ“ฑ

2.The class names are using BEM methodology.

3.Lighthouse scores:

  • 100% for Best Practices and SEO
  • 90% for Accessibility
  • 93% for Performance.

Community feedback

Bryan Liโ€ข 3,550

@Zy8712

Posted

Your site looks pretty good. Main feedback I'd give is with regards to how your container reacts to changes in screen size. When in the mobile layout your container should have its three sections in three blocks vertically stacked on top of each other. Additionally, when reducing window size your container shrinks resulting in text overflowing out of the container.

One additional thing, you should add to your html is a <main> tag. This would primarily be for accessibility purposes.

Hope this helps ๐Ÿ‘

Marked as helpful

1

P

@XenoMee

Posted

@Zy8712 It triggers the mobile layout for screen-sizes with max-width of 375px. Chrome doesn't apparently shrink the window to that size, only in the inspector.

I noticed the text overflowing but I didn't optimize the website for multiple breakpoints in the media queries.

Thanks a lot for all the information!โ˜บ๏ธ Will make the next challenges/website more responsive to screen size changes.

0

@MelvinAguilar

Posted

Hello there ๐Ÿ‘‹. Good job on completing the challenge !

I have some suggestions about your code that might interest you.

  • For specificity reasons you should work with classes instead of ids because they are more reusable. You can use ids to work with JavaScript, but you should use classes to style your elements. You can read more about this here ๐Ÿ“˜.
  • Setting the width of the component with a percentage or a viewport unit will behave strangely on mobile devices or large screens. You should use a max-width of 650px to make sure that the component will have a maximum width of 650px on any device, also remove the width property with a percentage value.

I hope you find it useful! ๐Ÿ˜„

Happy coding!

Marked as helpful

1

P

@XenoMee

Posted

@MelvinAguilar Thanks a lot! โ˜บ๏ธ

Noted:

  • Classes for styling and IDs for JavaScript.
  • max-width to set a fixed width to the component so that it doesn't behave strangely on different screen sizes.

I will modify the project around your information. Much appreciated!

1

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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