Design comparison
Solution retrospective
I find mobile responsiveness to be a challenge
I am unsure on the box-shading. on whether or not to have multiple shadows or just one.
How should I go about best solving this challenge?
Community feedback
- @denieldenPosted over 2 years ago
Hi Thendo, great work on this challenge! 😉
Here are a few tips for improve your code:
- add
main
tag and wrap the card for improve the Accessibility - add descriptive text in the
alt
attribute of the images - to make it look as close to the design as possible use the google font of challenge -> read here
- add
text-decoration: none
to thea
of title for remove the underline text - centering a
div
withabsolute
positioning is now deprecated, it uses modern css likeflexbox or grid
- remove all
margin
from.base
class - use flexbox to the body to center the card. Read here -> best flex guide
- after, add
min-height: 100vh
to body because Flexbox aligns child items to the size of the parent container - You can add the effect
:hover
creating adiv
that appears on hover. I used tailwind but you can still see and understand which css properties you can use to do the same. Look here -> my solution - using
<hr>
for the line is not the best way because this tag have a semantic meaning... in this case use div withborder-bottom
because this line is decorative - add
transition
on the element with hover effect - instead of using
px
use relative units of measurement likerem
-> read here
Overall you did well 😁 Hope this help!
Marked as helpful1@Thendo-TPosted over 2 years ago@denielden Thank you Daniel. This was detailed and very helpful. Your help is much appreciated 🙏
1 - add
- @vanzasetiaPosted over 2 years ago
Hi, Thendo! 👋
Congratulations on finishing this challenge! 👏 Good effort on this challenge! 👍
About the box shadow for the card, I had done this challenge and I added solid box-shadow to it and in my opinion, it looks similar to the design.
Now, some suggestions on this solution.
- I would highly recommend writing the file path in a consistent format. In this case, I notice one that is using back-slash and the others use forward-slash. So, the consistent format will make your code more readable and as a result, make it easier to understand by other developers (including your future self).
- Use CSS
border
property to create the line.hr
element has a role as a separator. In this case, the content below the line should not be separated. - Always use classes to reference all the elements that you want to style. Using
id
is going to make your stylesheet have high specificity (hard to maintain).
That's it! Hope you find this useful! 😁
Marked as helpful1@Thendo-TPosted over 2 years ago@vanzasetia Hi Vanza Sentia 👋
Thank you for the encouragement and the ideas/hints to completing and making the challenge code easy to read. I will implement your input into my code, much appreciated.
0
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