
Design comparison
Solution retrospective
The fact that i'm getting better as days goes by, i will like to improve in java script and become better overall.
What challenges did you encounter, and how did you overcome them?adding a shadow to the blog post, i had to seek help to complete.
Community feedback
- P@kaamiikPosted about 1 month ago
Hi. I have some notes for your code:
HTML Structure
-
Use a proper title in your head of html like Blog Preview Card.
-
Add your fonts locally with
font-face
on CSS or withlink
tag on your html head. -
You need a proper HTML structure. After your
main
, first wrap all of your code into thediv
with something like.container
class and add abox-shadow
andmax-width
and other properties that is needed. You don't need a<div class="shadow"></div>
for shadow.
Text Elements and Semantics
- The
<h1>
has hover effect so you should wrap it inside aa
tag too. You can do it like this:<h1> <a>...</a> </h1>
CSS Best Practices
- Start with a proper CSS reset (Andy Bell or Josh Comeau resets are recommended)
- Avoid fixed widths:
- Remove
width: 400px
frommain
- Use
max-width
for better text container adaptability - Remove unnecessary
width: 100px;
and usepadding
instead
- Remove
- Use relative units:
rem
forfont-size
andmax-width
instead ofpx
- Learn more about this here
Marked as helpful0@faruqshehuPosted about 1 month ago@kaamiik thanks man, i appreciate your feedback, i had challenges with box-shadow and tried something like which you are suggesting but didn't work, hence the reason i result into using this method. but will try this again. thanks once again.
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