Design comparison
Solution retrospective
Here my solution for 3-column-preview-card-component-main, feel free to give some feedback Thank you.
Community feedback
- @PhoenixDev22Posted over 2 years ago
Hello @audinastgg,
Congratulation on completing this challenge,
I have some suggestions regarding your solution:
HTML
-
About <h1> it is recommended not to have more than one h1 on the page .You can add a
<h1>
withclass="sr-only"
(Hidden visually, but present for assistive tech). Then you can use<h2>
instead of those<h1>
. -
For any decorative images, each img tag should have empty
alt=""
as you did andaria-hidden="true"
attributes to make all web assistive technologies such as screen reader ignore those images . In this challenge , all the images are decorative. -
Clicking those
"learn more"
buttons would trigger navigation not do an action so button elements would not be right. And for future, it is essential if you include a button in a form element without specifying it's just a regular button, it defaults to a submit button, so it's a good idea to make a habit of specifying the type. So use the<a>
. -
To make the card perfectly in the middle of the page, you can make the body element as a flexbox container and give it
min-height: 100vh
.Remove the margin -
border-radius
andoverflow hidden
to the main container that wraps the three cards so you don't have to set it to individual corners. -
If you make each column into a flex column. and set everything inside the cards to have some margin in one direction
margin-bottom: ;
.only the link wouldn't need it and usemargin-top: auto
on thelearn more link
that will push it to the bottom of the cards. -
It's recommended to use
em
andrem
units .Bothem
andrem
are flexible, Usingpx
won't allow the user to control the font size based on their needs.
On the hover on the links , they go up . It's not normal . so for that you can use
border:2px solid transparent ;
for.btn
and on the hover they will beborder:2px solid white;
.And it is essential that interactive elements have
focus-visible
styles as well as hover styles. These need to be really clear and obvious as they are needed to help a keyboard user know where is focused on the page.-
Check the responsiveness again .
hopefully this feedback helps.
Marked as helpful0 -
Please log in to post a comment
Log in with GitHubJoin 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