In this screenshot, the title is "Title goes here", the secondary text is "Secondary text", and the body text is "Greyhound divisively hello coldly wonderfully marginally far upon excluding."
The card's root element is a <div> with a class of "card".
The card is 344px wide.
The desert picture is 194px tall.
The padding between the body text and everything else is 16px.
The color of the title text is #000.
The color of the secondary and body texts is #232F34.
The size of the person picture is 40px in diameter.
The size of the body text is 11px.
The size of the title is 22px.
For the padding or margin around any other elements, use your best judgment to make it look like the screenshot.
Transitions:
When a person moves their pointer over a picture card, then the card gets a shadow of rgba(0, 0, 0, .3) with a 0px horizontal offset, 2px vertical offset, and a blur radius of 4px.
I’ve attempted the HTML and CSS portion, but keep running into a wall. Below is the code for both.
.card {
display: flex;
flex-direction: column;
width: 344px;
padding: 16px;
color: #232f34;
font-size: 11px;
}
.card_image {
height: 194px;
}
.person {
border-radius: 40px;
border-radius: 50%;
height:50px;
}
.card-header {
display: flex;
color: #000;
font-size: 22px;
text-align: center;
}
.card body {
display: flex;
font-size: 22px;
text-align: center;
color: #232f34;
}
.footer {
display: flex;
font-size: 11px;
text-align: center;
color: #232f34;
padding: 16px;
}
.card card-shadow {
border: none;
box-shadow: 0px 2px 4px rgba(0, 0, 0, .3)
}
<div id="container"></div>
<div class="card">
<div>
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/8/8e/Arabian_Desert_-_panoramio.jpg/544px-Arabian_Desert_-_panoramio.jpg" alt="" class="card_image">
<div>
<img class="person" src="https://png.pngtree.com/png-vector/20220709/ourmid/pngtree-businessman-user-avatar-wearing-suit-with-red-tie-png-image_5809521.png">
<div class="card-header">Title goes here</div>
<div class="card body">
secondary text
</div>
<div class="card footer">
Greyhound divisively hello couldly wonderfully marginally far upon excluding
</div>
<div class="card card-shadow"></div>
</div>
</div>
</div>
2
Answers
Try it also
Height given to card image box based on the content height