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 page - Stats preview card component

@romariobarbosa

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


I was unable to color the image using CSS. So I decided to color in an external software.

How can I do this using CSS?

Community feedback

@gabscarlos

Posted

Para colocar cor na imagem eu usei uma div com background-color e opacity por cima

2

@romariobarbosa

Posted

@gabscarlos Obrigado! Irei testar desta forma.

0

@rilweezy120

Posted

You create an overlay and place it using absolute positioning also setting opacity to make it transparent E.g .overlay{ width:70%; background: pink; height: 30vh; top:20px; left:20px; opacity: 0.2; }

you can also center an element vertically and horizontally using margin: auto.

Nice solution and keep building

0
Hassia Issah 50,670

@Hassiai

Posted

For the color of the image, give the img a width of 100%, height of 100%, object-fit of cover, mix-blend-mode: multiply and opacity: 0.8

img{
width: 100%;
height: 100%;
object-fit: cover;
mix-blend-mode: multiply;
opacity: 0.8;
}

To center .conteudo on the page, add min-height:100vh; display: flex; align-items: center: justify-content: center; or min-height:100vh; display: grid place-items: center to the body.

To center .conteudo on the page using flexbox:
body{
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
To center .conteudo on the page using grid:
body{
min-height: 100vh;
display: grid;
place-items: center;
}

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

0
Fox 550

@urboifox

Posted

I dont understand the comment but i hope Gabriel explained how 😄

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