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-component-main

@VikashMaurya10

Desktop design screenshot for the Stats preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

Hassia Issah 50,670

@Hassiai

Posted

For the color of the image, wrap the picture in a figure tag. <figure><picture><img></picture></figure> in the css give the figure a background color of soft violet and add a height of 100%, object-fit: cover, mix-blend-mode: multiply and opacity: 0.8 to the img.

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

Use relative units like rem or em as unit for the padding, margin, width values and preferably rem for the font-size values, instead of using px which is an absolute unit. For more on CSS units Click here

Hope am helpful.

Well done for completing this challenge. HAPPY CODING

Marked as helpful

0

@VikashMaurya10

Posted

@Hassiai, Thankyou so much.

0
Abdessamad 210

@styrexx

Posted

Hello there 👋. You did a good job!

There are a few changes you can make to your solution to be better.

  • To color the image : Go to your HTML file and add a div at the bottom of the image
<div class="color"></div>

And in your CSS file

img{
    height: 100%;
    mix-blend-mode: multiply;
}
.img{
    background-color: hsl(277, 64%, 61%);
    position: relative;
}
.color{
    background-color: hsl(277, 64%, 61%);
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0.2;
}

To understand better go to my solution maybe you can find it useful here is the 🌐 link.

I hope you find this 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