JSFiddle - React, Tailwind, and code Playground
by moshfeu
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>NutriClean</title>
<link rel="stylesheet" href="home.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="UTF-8">
</head>
<!--testimonials -->
<section class="testimonials">
<h2 class="md text-center my-2 bold">Testimonials
</h2>
<div class="container flex">
<div class="card">
<p>Simple and easy-to-use app, perfect for my commute into work. Saves on stress of having to find a space in the morning in such a difficult area to find parking.</p>
<div class="img-container">
<span>test with a non image</span>
</div>
</div>
<div class="card">
<p>The house looked spotless - Robyn</p>
<div class="img-container">
<img src="https://images.unsplash.com/photo-1508214751196-bcfd4ca60f91?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80"/>
</div>
</div>
</div>
</section>
</html>
CSS
.card {
color: #333;
background-color: white;
border-radius: 10px;
box-shadow: 0 3px 10px rgba(0,0,0,0.2);
padding: 20px;
margin:10px;
}
/*testimonials*/
.testimonials .flex {
flex-wrap: wrap;
/*wraps cards onto next row */
}
.testimonials .card {
text-align: center;
margin: 18px 10px 40px;
/*transition: transform 0.2s ease-in;*/
width: 255px;
height: 236px;
}
.testimonials .card img {
border-radius: 50px;
width: 100px;
height: 100px;
position: relative;
}
.img-container {
display: block;
text-align: center;
position: relative;
}
.img-container::before {
content: " ";
width: 100%;
position: absolute;
left: 0;
top: 50%;
height: 1px;
background: green;
/* z-index: -1; */
}