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 css flexbox

@cynthiachinenye

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?

would like to make use of the CSS framework to build because of the responsive pattern

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

it is really nice to master flexbox to an extend

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

learn the major area to use

Community feedback

@30vam

Posted

To center the card using flexbox you can do this: body { display: flex; //Makes the page act like a flexbox instead of a block element justify-content: center; //Centers the content on the main axis (horizontally) align-items: center; //Centers the content on secondary axis (which is vertical by default) min-height: 100vh; //Sets the page height to browser viewport height }

I think you could also simply use the <img> tag with a source attribute to import the card banner instead of copying the entire svg code in index.html file.

Marked as helpful

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