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

3 Column Preview Card Component using CSS Flexbox and Grid

#accessibility
Aatif Sohelβ€’ 140

@aatifsohel

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


Hey everyoneπŸ‘‹

What do you think of my code?

How can I improve my coding skills?

If you have any suggestions, feedback is appreciated!

Community feedback

AntoineCβ€’ 1,180

@AntoineC-dev

Posted

Hello Aatif Sohel. Good job on completed this challenge πŸŽ‰πŸŽ‰

It looks good at 375px and above 1280px. However as stated by @Yehan20 you should avoid using fixed sizes.

The goal is to make the component take the maximum space available but give it the ability to shrink to fit in the screen.

You have two ways to implement a max-width:

.my-component {
    max-width: 32rem; /* 1rem = 16px */
    width: 100%;
}
.my-component {
    width: min(100%, 32rem);
}

Secondly I think you should have a transition on your buttons on hover and add the :focus selector to make sure the styles also change when the user focus the button with keyboard navigation.

An implementation could be:

.my-button {
    color: white;
    background-color: black;
    transition: color 300ms linear, background-color 300ms linear;
}

.my-button:hover,
.my-button:focus {
    color: black;
    background-color: white;
}

Hope it helps. Happy coding. Peace 😊

Marked as helpful

2

Aatif Sohelβ€’ 140

@aatifsohel

Posted

@AntoineC-dev : Thank you so much for the detailed review!

I will try to apply what said!

1
Yehan Nilangaβ€’ 690

@Yehan20

Posted

Hello Congratulation's on the challenge .Instead of using a fixed width you could use a max width for each cards , which means it will act responsively. also , in order to make it responsive from the mobile device break point , you could change the size of the dimension of your media query for example in your style.

@media (max-width: 375px) {}
    you could change it to 
@media (max-width: 767px) {} so your layout would look more cleaner

I hope my feedback was helpful.

Marked as helpful

2

Aatif Sohelβ€’ 140

@aatifsohel

Posted

@Yehan20 : Thank you for checking out my solution and for your valuable feedback!

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