Hello! Your solution looks excellent overall!
A few things you might want to add are the rounded corners of the card component and add overflow: hidden
so the image molds into the rounded corners.
To answer your questions:
- You can vertically center a
span
element by adding Flexbox to the parent element like this:
display: flex;
items-align: center;
- Yes, it is possible to set the height of the
div
the same as the background image by addingbackground-size: cover
to yourdiv
. If you are using animg
element, you can also do it by addingobject-fit: cover
to yourimg
element.
I hope this helps! Happy coding ✨
0