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 3 card component solution using CSS Grid

belkysupreme22โ€ข 160

@belkysupreme22

Desktop design screenshot for the 3-column preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


had difficulity on the borders and paragraph for the mobile design. any suggestions appreciated

Community feedback

@MelvinAguilar

Posted

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

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

  • Instead of adding borders separately to each column, consider applying a border to the entire component. Then, use overflow: hidden to cut off the excess and make the border apply uniformly to the entire component. This can provide a cleaner and more consistent appearance.

    .grid-container {
      border-radius: 5px;
      overflow: hidden;
    }
    
    /* And remove ALL border-radius from the styles */
    .sedans {
        /* border-bottom-left-radius: 5px; */
        /* border-top-left-radius: 5px; */
    }
    
  • The margin on the body is too large, enough to distort the solution on mobile devices. Also, using margin on the body element can result in unnecessary scrolling in some cases. You should use a modern method to center it, such as flexbox or grid, and also employ max-width on the component to prevent it from elongating too much.

    body {
      /* margin: 200px 238px; */
      margin: 0;
      display: flex;
      min-height: 100vh;
      justify-content: center;
      align-items: center;
    }
    
    .grid-container {
      border-radius: 5px;
      overflow: hidden;
      max-width: 900px; /* Add this new line */
    }
    

I hope you find it useful! ๐Ÿ˜„ Above all, the solution you submitted is great!

Happy coding!

0

belkysupreme22โ€ข 160

@belkysupreme22

Posted

@MelvinAguilar thanks for your feedback, it really made my design look closer to the provided one. i have updated the codes and you can preview the updated site for the outcome

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