I am trying to create a Card with just html and CSS and for now the card seems okay but in the text section of the card, I see some extra white space just above the text. Can someone please see as to why i might be getting that?
Here is a link to a working codepen.
h1 {
text-align: center;
}
.container {
margin: auto;
border: solid;
width: 300px;
text-align: center;
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
}
.card-text {
background-color: lightgreen;
padding: 0;
margin: 0;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Let's Create a Card</title>
</head>
<body>
<h1>Card</h1>
<div class="container">
<img src="https://i.pinimg.com/originals/ca/76/0b/ca760b70976b52578da88e06973af542.jpg" alt="My-image" height="300px" width="300px">
<p class="card-text">Some Text that goes for the card Lorem ipsum dolor sit amet consectetur adipisicing elit. Sed ipsa cum illo accusamus aperiam nulla quam. quae?</p>
</div>
</body>
</html>
Thank you for the assistance.