Responsive preview card using html & css

Solution retrospective
What is the accent and how does it really work? Is it possible to use table tags only for the card? I found it quite difficult to work with the stats and their values Padding and margin were also difficult for me to work with I am a total beginner in this, and this is my first work, a help from experienced would mean everything
Please log in to post a comment
Log in with GitHubCommunity feedback
- @hyrongennike
to answer your first question you can add the following to add the overlay just remember to use the correct shade of purple.
.photo { position: relative; } .photo::before { content: ""; position: absolute; top: 0; left: 0; background: purple; width: 100%; height: 100%; opacity: 80%; mix-blend-mode: multiply; }
you can remove the width and height on the image and add the following.
img { width: 100%; }
Also add the following there's a lot work that still needs to be done but this should send you in the right direction.
body { background-color: hsl(233, 47%, 7%); font-family: 'Inter', sans-serif; font-size: 15px; display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 100vh; } .flex-container { max-width: 1024px; }
Marked as helpful - @hyrongennike
Hi @DrStranger1,
Good job on your first attempt of the challenge
If you mean using a table for layout then it's a big no. That used to be a thing in past and it's not responsive. Also there's no reason to use it as you have flexbox and grid which makes this easier. below is a link to learn flexbox in a fun way.
This is if you want to learn CSS grid. https://cssgridgarden.com/
You can also remove the margin on the .flex-container to center the card.
Don't rush your learning process and in the process pick up bad practices
There are a lot of tutorial on YouTube, if you click on resource in the menu there are tutorials take your time to learn.
Marked as helpful
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