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

Stats Preview Card

suhaib52 280

@suhaib52

Desktop design screenshot for the Stats preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Does anyone have idea why on mobile version my image is not displaying properly from the top?

Community feedback

Hassia Issah 50,670

@Hassiai

Posted

Replace <section class="card"> with the main tag to fix the accessibility issue. There is no for <br> in <section class="highlights"> , replace all the <h2> in <section class="highlights"> with p and give it a class for the styling, wrap each set in a div. sample

 <section class="highlights">
<div class= " col"><p class= "number"></p><p class= "text"></p></div>
<div class= " col"><p class= "number"></p><p class= "text"></p></div>
<div class= " col"><p class= "number"></p><p class= "text"></p></div>
</section>

Use rem or em as unit for the padding, margin, width and preferably rem for the font-size for more on CSS units Click here

To center .card on the page using flexbox, replace the height in the body with min-height: 100vh.

Give the .card a fixed width value instead of a min-width value and a percentage width value. this applies to the media query as well.

For the color of the image, give .rightContainer a background-color of soft violet. and add mix-blend-mode: multiply and opacity: 0.8 to the img

.rightContainer{
background-color: hsl();
}
img{
width: 100%;
height: 100%;
object-fit: cover;
mix-blend-mode: multiply;
opacity: 0.8;
}

Hope am helpful.

Well done for completing this challenge. HAPPY CODING

Marked as helpful

0

suhaib52 280

@suhaib52

Posted

@Hassiai Thank you so much for your suggestions. That makes sense to me.

0
Nelson 2,390

@nelsonleone

Posted

HELLO......congrats on completing this challenge well done 🎉 🎉

I noticed some things with your solution here's some tips , hope this comment was helpful and made meaning to you

Based on your question , it's because you set a height on your <BODY>

Hope this was helpful and you understood, have fun coding

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