Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Blog preview Card

@AkshayAnand101

Desktop design screenshot for the Blog preview card coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


What are you most proud of, and what would you do differently next time?

I learnt how to change bg-color of entire page without changing the bg-color of div

What challenges did you encounter, and how did you overcome them?

I used the resources on the web torectify my mistakes I added shadows hover colr changing feature

Community feedback

Boris 2,870

@mkboris

Posted

Great work AkshayAnand101, some suggestions

  • To properly center the card, add this on your body
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  • Avoid using fixed heights and widths on elements, as this can lead to responsiveness issues and poor content fitting. Instead, let the content and padding dictate the element's size. When necessary, use max-width or min-height. Update the .container width to use max-width.
  • Also, change the .img1 width to max-width: 100%; and give it a display: block; Using a modern CSS reset at the start of the styles in every project like this one Modern CSS Reset will help reset a list of default browser styles.
  • It's best practice linking Google fonts directly in the HTML head section rather than directly in your CSS file as it enables asynchronous downloading, improving page load times.
  • All content should be wrapped within landmarks. Wrap a footer tag around the .attribution.
  • Font-size should be written in rem not px. This article explains it better Why font-size must NEVER be in pixels.

Marked as helpful

2

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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