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

Responsive blog preview card

Mikhil Desaiā€¢ 200

@mike15395

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 understood that web by default is responsive and we make it unresposive by hardcoding widths and heights in px. So if we don't give any height or width then by default it's responsive. Even if you want to specify width and height always use percentages(%) so that it's responsive.

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

Writing responsive code was quite challenging intially then i learned that using percentages instead of px solved the problem quickly. Also applying border radius to image was taking time then i learned that use parent div for it and then give width/height/border radius to it.This fixed my problem.

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

nothing as of now.

Community feedback

Daniel šŸ›øā€¢ 44,230

@danielmrz-dev

Posted

Hey there! šŸ™‹šŸ½ā€ā™‚ļø

Congrats on completing the challenge! āœ…

Your project looks fantastic!

Here's a tip to make it even better:

Try this method to center the card vertically and horizontally:

šŸ“Œ Apply this CSS to the body (skip position or margins to make it work correctly):

body {
    min-height: 100vh;
    display: flex; 
    justify-content: center;
    align-items: center;
}

Hope this helps!

Keep up the great work!

0

Mikhil Desaiā€¢ 200

@mike15395

Posted

@danielmrz-dev thanks for your feedback. But after using your code, it perfectly aligns the card at center but there is scroll in vertical, why? how to avoid it?

Awaiting reply...

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