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

Single price grid component

P
Veronika 110

@designver

Desktop design screenshot for the Single price grid component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

Venus 1,640

@VenusY

Posted

You've done an awesome job with this challenge! Well done on making the page look like the design.

I noticed that you hard-coded the width for the .container element at smaller screen sizes:

.container {
  width: 19.4375rem;
}

This causes some overflow issues on screen sizes where the viewport width is smaller than the width of the .container element.

It's generally not recommended to hard code a width as it isn't responsive to changes in viewport width.

If you want the width of this element to be limited to a certain value, you can do this instead:

.container {
  max-width: 19.4375rem;
}

@media (min-width: 39.6875em) {
  .container {
    max-width: 39.6875em;
  }
}

This will allow the element to shrink as much as its contents allow it to, which is more responsive and therefore better for user experience.

The button does not react to being hovered over, which makes it difficult to tell that you're interacting with the button.

To fix this, you can change the button's background colour upon being focused on or hovered over:

.sign-up {
  cursor: pointer;
}

.sign-up:hover,
.sign-up:focus-visible {
  background-colour: #9ccc4c
  color: #eee;
}

cursor: pointer; changes the user's cursor to a pointer to make it clearer that you're hovering over a clickable object.

:hover is a pseudo-class which allows you to style the button when it's being hovered over, and focus-visible is a pseudo-class which allows you to style a button that's been focused on via keyboard navigation.

I've used these two pseudo-classes to darken the background colour and font colour of the button to make it more obvious that the button is being interacted with.

These changes are not only good for visual reasons, but also make your site more accessible and user-friendly.

This is a very minor thing, but you could also consider adding some whitespace on either side of the .container element by applying margin or padding to the body element.

Whitespace is good for visual balance, which improves user experience as well.

Hope this has been helpful! :)

0

P
Veronika 110

@designver

Posted

@VenusY Thank you for your feedback! Appreciate it!

0
Venus 1,640

@VenusY

Posted

@designver No problem! I hope I've been helpful to you. If so, I would greatly appreciate it if you'd consider marking my comment as helpful. :)

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