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 with Vanilla HTML & CSS

P
Rowan 50

@r-jeffery-wall

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


This was a fairly simple challenge, mainly used to brush up on my vanilla HTML & CSS before jumping in to more complex challenges.

I would particularly appreciate any feedback on elements of responsive web design. I have tried to use responsive units wherever possible but there may be some applications I have missed.

Community feedback

@Blackpachamame

Posted

Hey Rowan! this looks really good 😎

I just have some suggestions:

  • I recommend doing a small reset to the styles that come by default in the browsers. To do this, you can apply a couple of properties to the universal selector *, with this you will make your site look the same in all browsers:
* {
    margin: 0;
    box-sizing: border-box;
}
  • I leave you the task of researching the reset CSS and the box-sizing: border-box
  • Do not use height: 100vh instead use min-height: 100vh this will prevent the content from being cut off on certain occasions
  • To center the content you can apply flexbox to the body:
body {
    min-height: 100vh;
    background-color: hsl(47, 88%, 63%);
    font-family: 'Figtree', sans-serif;
    font-size: 16px;
    line-height: 150%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
}
  • With these changes your div with class main-container will no longer be necessary, you can delete it and leave the div with class preview-card

Marked as helpful

2
P
Abbas Sher 440

@Abbassher55

Posted

Hi. Your solution look great.

However i have point out that in design when the card is in active or hover state the drop-shadow increases to 16px from 8px in both x and y directions which looks like the card pops up. Also on hover the heading color change to yellow color. Also check the color and font weight of published date with design.

Apart from this your solution is awesome.

1

P
Rowan 50

@r-jeffery-wall

Posted

@Abbassher55 Oops! I completely missed that part. Thanks for pointing it out, I've updated my solution.

0

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