JSFiddle - React, Tailwind, and code Playground

by RedDragonWebDesign

HTML

<div class="card">
	<img src="https://images.media-allrecipes.com/userphotos/560x315/2535941.jpg">
	<h3>Baked Ziti with Sausage</h3>
</div>

CSS

body {
	background-color: rgb(48,103,176);
}

.card {
	display: flex;
	flex-direction: column;
	border-radius: 15px;
	background-color: white;
	width: 200px;
}

.card > img {
	width: 100%;
	height: 400px;
	object-fit: cover;
	object-position: 50% 50%;
}

.card > h3 {
	border: 2px solid red;
	margin: 0;
	padding: 10px;
	text-align: center;
}