Frontend Mentor - 3-column preview card component
Design comparison
Solution retrospective
Any advice where I should add media queries?
Community feedback
- @PhoenixDev22Posted over 2 years ago
Hello
Congratulation on completing this challenge. Excellent work! I have few suggestions regarding your solution, if you don't mind:
HTML
- 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. You can have<h1>
visually hidden withsr-only
. 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=""
andaria-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"
orrel="noreferrer"
totarget="_blank"
links. When you link to a page on another site usingtarget=”_blank”
attribute , you can expose your site to performance and security issues.
Aside these, great work on this one. Hopefully this feedback helps.
Marked as helpful0 - About
- @PiyushJain01Posted over 2 years ago
Hi , First of all congratulations on completing this challenge. In mobile view the container is not aligned horizontally center. Just try this :-
In mobile view :
.container { margin: 0 auto; padding-top: 2.5em; padding-inline: 1rem; display: flex; align-items: center; flex-direction: column; }
And in Desktop view :
@media (min-width: 580px) { .container { max-width: 800px; flex-direction: row; align-items:initial; }
Apart from this everything is perfect. 👍 Hope this will help you. Happy coding :)
Marked as helpful0 - @DavidMorgadePosted over 2 years ago
Hello again Luis, congrats on finishing the challenge! you did a pretty good job with the responsive part!
To answer your question, there are 2 important points for mediaqueries when building your site from a mobile size,
min-width: 768px
for tablet devices andmin-width: 1440px
for desktop devices. In this particular project I think that your media querie fits perfect at768px
!Hope my feedback helps you, good job!
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