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

Laura 30

@Temiloluwa16

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 am most proud of the div containers that I was able to style accordingly

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

I had challenge with the styling but I think I am improving

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

the css actually

Community feedback

@KapteynUniverse

Posted

Hey, nice work. A couple of things:

You are trying to

    align-items: center;
    justify-content: center;

but you don't have a flex or grid on the body. For your code this should do the trick

body {
text-align: center;
    background-color: #F6D050;
    font-family: "Figtree", sans-serif;
    align-items: center;
    justify-content: center;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

All content should be contained within landmarks. Use a main element to wrap the component.

Skipping heading ranks can be confusing and should be avoided where possible: Make sure that a <h2> is not followed directly by an <h4>, for example. It is ok to skip ranks when closing subsections, for instance, a <h2> beginning a new section, can follow an <h4> as it closes the previous section.

For more info

Pixels are fixed sizes and don't scale well on different devices. Instead, use rem or em, which are relative units that adjust based on user settings, making your design more flexible, responsive, and accessible.

Also instead of width, height try to use min or max-width/height

Marked as helpful

0

Laura 30

@Temiloluwa16

Posted

Thank you for pointing these out. I’ve made the necessary adjustments. Please feel free to correct me if I make any mistakes in the future@KapteynUniverse

0
Kalyan TR 40

@tr-Kalyan

Posted

The code looks good and maintaining external css file is good. One thing I can suggest is use semantic tags such as <section> instead of <div> just for the outer part. Also, using flex box gives us more flexibility to alter the position of content.

0

Laura 30

@Temiloluwa16

Posted

Thank you for your review. Please how do i know when to use <section> instead of <div>? if you don't ming me asking@tr-Kalyan

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