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
Request path contains unescaped characters

Submitted

3-column preview card component

hemziβ€’ 30

@hemzi

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


I used grid display.

There is a weird issue in mobile view where the content extends outside the scrollable area of the viewport/window. I'm not sure what's causing it aside from misunderstanding padding/margin. (fixed)

I'm unable to add padding to the buttons without distorting the radius, cause the 'pill' to have flat edges on left/right. (fixed)

Community feedback

@MelvinAguilar

Posted

Hi @hemzi πŸ‘‹, good job on completing this challenge! πŸŽ‰

Here are some suggestions you might consider:

Regarding your first question:

  • Use min-height: 100vh to body selector, with this property you set a height and let the element grow even more if necessary.

Here are some other suggestions:

  • The Learn More elements should be anchor tags and not buttons because they redirect to another part of the page.
  • Use margin: 0.938rem or margin: 15px in the .cards selector so that it has some space when viewed on mobile devices.
  • In other solutions, If you intend to use buttons and you have 'flat edges", add padding and increase the border-radius.
  • Instead of using pixels in font size on the body element, use relative units of measure like rem or em. The font size in absolute length units (px) does not allow users with limited vision to change the text size in some browsers. Reference.

I hope those tips will help you.

Good job, and happy coding!

Marked as helpful

1

hemziβ€’ 30

@hemzi

Posted

@MelvinAguilar thank you for those fixes!

1
hemziβ€’ 30

@hemzi

Posted

@MelvinAguilar do you have a reference for determining when to use anchors vs. buttons?

0

@MelvinAguilar

Posted

@hemzi Hi!

An anchor tag (<a>) should be attached if the element redirects to a section of the same page or an external one.

A button can be used to perform the functionality of an interactive element, such as displaying a modal, sending information, changing or calculating data, etc.

More info: Button versus Link

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