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 using HTML and CSS

@zapfish1

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'm proud to say i was able to enjoy myself while doing this!!

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

centering the div, i looked at older projects and figured out how to implement that solution on this one

What specific areas of your project would you like help with?

i'm just confused as to why the page has a scroll even though the container is not occupying the whole height

Community feedback

P
Koda👹 3,810

@kodan96

Posted

hi there! 👋👋

You didn't do a CSS reset at the top of your CSS file, so your body has 8px margin on it, since you set a min-height: 100vh; on body it takes up the whole screen, but there's it's margin above and below it, and the margin causing the overflow and the scrolling. This is the default behavior of the browser, it's good practice to do a CSS reset when you start your project. This means you're overwriting these default values. I usually do a CSS reset like this:

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

* is the universal selector in CSS, my code sets every elements padding and margin to 0. Note that if you apply these now, you need to rearrange your entire layout.

Hope this helps 🙏

Good luck and happy coding! 💪

Marked as helpful

1

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