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 raw html and css

罗中泰 50

@thaidar4

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?

wouldn't it be lovely if a truck-sized meteorite slammed into my flat and vaporized myass in a blink of an eye

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

having a sleep deprivation the whole day. But once I go to bed, I just start self-arguing in my head. tf is wrong with me ?

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

Something about my element sizing. I put most of them in px units, so when I preview the phone view on my PC (1920x1080px) and shrink it down to 375~600x1080px to mimic phone ratios, it looks accordingly. But when I access the web on my actual phone (1440x3040px), it still looks good. Shouldn't it be shrink to oblivion, no?

Community feedback

Donny 120

@Donitron

Posted

Hey there!

It seems like you are struggling with the responsiveness, how it would look on smaller screens.

How I did this was by giving the card a min-width as well as a max-width so it can freely adjust itself between these values.

As for making sure the image scales well along side it, I put the img in a div wrapper and made used object-fit: cover for the image element itself. This way the image would always fill in the area of the div without stretching or leaving empty spaces.

Hope this helps!

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