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

CSS grid and flexbox were used to layout the contents

Khwilo Kabaka• 130

@khwilo

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


  1. I would like a review on my code to see how well I can space the items on the second row and first column.
  2. I would also like to know how well to cater for mobile screen sizes other than the ones with widths less than 375 pixels.

Community feedback

P
AjeaS• 675

@AjeaSmith

Posted

Hey Khwilo, looks good! :)

  1. you can try setting the justified-content to be 'space-evenly' this would make it not too spaced apart. But, if the spacing is still too much you could add padding (top and bottom) of elements to make it a little bit of spacing :)

  2. I would say you could do 2 breakpoints.

  • (min-width: 375px) Phone screens - you can adjust the second row to be in a column (stack on top of each other)

  • (min-width: 768px) tablet screens and higher - you could set them back to rows (next to each other)

Hope this helps! :) if you need help with anything I'm on slack @ajeasmith

1

Khwilo Kabaka• 130

@khwilo

Posted

Thank you @AjeaSmith. I used this approach to create styles for both the tablet screens and the phone screens:

@media only screen and (max-width: 768px) { /* code here */ }
0
P
Matt Studdert• 13,611

@mattstuddert

Posted

Hey Khwilo, nice work on this challenge!

  1. I'd definitely say that there is a little too much vertical spacing, which could do with some revisions. One way to work with the JPG design files would be to open it up at its natural width (1440px) and then have it side-by-side with your project so that you can do a like-for-like comparison. Getting spacings right is one of the hardest parts of CSS in the early days of building websites, so this will definitely come with practice and experience.
  2. I usually use min-width media queries and start them at around 500px, but it does change based on the project. This means that all of your mobile (and general) styles are outside of your media queries. I would still build the mobile screen at 375px, to match the design, but I'd constantly be increasing and decreasing the screen size to make sure the content looks OK.

Let me know if you have any questions about any of this. Keep up the great work!

0

Khwilo Kabaka• 130

@khwilo

Posted

@mattstuddert I managed to work successfully on the different screen sizes. Currently, I am trying to figure out how to go about the vertical spacing. Do you have any detailed tips or recommendations that one may consider?

0
P
Matt Studdert• 13,611

@mattstuddert

Posted

@khwilo with that I'd just have your project side-by-side with the design and go through the different elements editing the margin to space them as you'd like.

0

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