Responsive Blog Preview Card with hover state
Design comparison
Solution retrospective
I am proud that this is my second challenge and l amazed at how much l am learning through tackling the coding challenges. This challenge took me less time than when l attempted the QR Code Component challenge because l now have some understanding of HTML5, Flexbox and how center elements and make them responsive.
What challenges did you encounter, and how did you overcome them?I spent so much time trying to figure out why elements were displaying horizontally and next to each when there were block-level elements. I then read on the issue and realized that is the default flow of elements when using display: flex.
What specific areas of your project would you like help with?Read more on Flexbox (the execerices have allowed to just scratch the surface) Read on the difference between em and rem and best use case for each unit.
Community feedback
- @DylandeBruijnPosted 4 months ago
@ownedbyanonymous
Hiya! 👋
Congratulations on your solution, it looks very close to the design! I can tell you put a lot of effort into it.
Things I like about your solution 🎉
- Use of semantic HTML elements
Things you could improve ✍️
-
I suggest adding a bit of
padding
to yourbody
element so the card has some space around it on smaller viewports. -
You could add a
min-height: 100vh
to yourbody
element so it takes up the full height of the viewport while still being able to grow when the content inside it grows. -
Try experimenting with CSS variables, they help you make your CSS values more reusable across your code.
-
I suggest using clear descriptive CSS classes like
.card
,.card-title
and.card-description
. -
You don't need
width: 100vw
on yourbody
.body
is ablock
element which take up the full width of their parent by default. -
Try making your solution more responsive.
-
I suggest not setting a fixed
height
andwidth
on elements. If the content in these elements grows larger you'll run into overflow issues. Try keeping theheight
atauto
whichblock
elements have by default. -
I suggest not using the
small
element and replacing it by a heading or paragraph element. -
I suggest replacing the
address
element by adiv
. Theaddress
element is for addresses.
I hope you find my feedback valuable, and I would appreciate it greatly if you could mark my comment as helpful if it was! 🌟
Let me know if you have more questions and I'll do my best to answer them. 🙋♂️
Happy coding! 😎
Marked as helpful0@ownedbyanonymousPosted 4 months agoHie @DylandeBruijn 👋🏾 thank you so much for your feedback, it was really detailed and helpful. May you please kindly assist me with a bit of details on the first point. I get do get what you are saying, on smaller devices the card touches the right margin of which some padding and for the card to remain centered without having to scroll. I have an on pull-request on GitHub please feel free to leave some comments.
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