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

Madu Jang 340

@MJspitta

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 had issues with keeping containers at the same size after adding padding but box-sizing:border-box; resolved it! Is it good practice to put it in the universal selector before you start styling?

Community feedback

PhoenixDev22 16,950

@PhoenixDev22

Posted

Hi Madu Jang,

Congratulation on completing another frontend mentor challenges. Excellent work! I have some suggestions regarding your solution, if you don't mind:

  • Use the <footer>landmark to wrap the attribution, as using landmarks is important to improve navigation experience on your site for users of assistive technology.
  • About <h1>it is recommended not to have more than one h1 on the page. Multiple <h1>tags make using screen readers more difficult, decreasing your site’s accessibility. Then swap those <h1> by <h2>.
  • In this challenge, the images are much likely to be decorative. For any decorative images, each img tag should have empty alt="" and aria-hidden="true" attributes to make all web assistive technologies such as screen reader ignore those images.
  • What would happen when the user click those learn more? In my opinion, clicking those "learn more" would likely trigger navigation not do an action so button elements would not be right. So you should use the <a>. For future use , it's a good habit of specifying the type of the button to avoid any unpredictable bugs.
  • Adding rel="noopener" or rel="noreferrer" totarget="_blank"links. When you link to a page on another site using target=”_blank” attribute , you can expose your site to performance and security issues.
  • Add border-radius andoverflow hiddento the main container that wraps the three cards so you don't have to set it to individual corners.
  • On your buttons learn more, add border: 2px solid transparent; to the regular state. This way when the hover on the buttons , it doesn't add an additional 4 pixels to the height and width making the elements shift.
  • Don't capitalize in html, let css text transform take care of that. Remember screen readers won't be able to Read capitalized text as they will often read them letter by letter thinking they are acronyms.

Aside these, great job on this one. Hopefully this feedback helps.

Marked as helpful

1

Madu Jang 340

@MJspitta

Posted

@PhoenixDev22 Thank you very much! This was more than helpful! I'm grateful

1
PhoenixDev22 16,950

@PhoenixDev22

Posted

@MJspitta Glad to hear that it was helpful. Happy coding!

0
Eduardo 910

@KTrick01

Posted

Hi! About your question, yes, it is a good practice, actually it should be the standard, so practically everyone starts their codes with a box-sizing: border-box; I can't think in a situation where it could be see as a "bad" thing

Marked as helpful

0

Madu Jang 340

@MJspitta

Posted

@KTrick01 Thank youuu!

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