Tell us what’s happening:
I need help. How do i “fill the entire width of the card” using my img (step 20) and despite having a hover effect, it still says that my .read-more needs a hover effect on its element. (step 13)
Your code so far
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Blog Post Card</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="blog-post-card">
<img class="post-img" src="https://cdn.freecodecamp.org/curriculum/labs/cover-photo.jpg" alt="Cover Photo" width="160" height="100">
<div class="post-content">
<h2 class="post-title">My Blog Post</h2>
<p class="post-excerpt">This is my blog post, I send blogs here and post them. Please enjoy.</p>
<a class="read-more">Read More</a>
</div>
</div>
</body>
</html>
/* file: styles.css */
.blog-post-card {
border: 2px dashed;
border-radius: 20%;
background-color: white;
text-align: center;
width: 50%;
margin: auto;
}
.post-img {
margin-top: 15px;
margin-bottom: 10px;
width: auto;
border-bottom: 2px dashed;
}
.post-content {
text-align: center;
padding: 20px;
}
.post-title {
color: green;
}
.post-excerpt {
color: green;
}
.read-more {
color: purple;
background-color: green;
display: inline-block;
margin: 10px;
padding: 10px;
border: 3px dashed;
border-radius: 20%;
}
a:hover {background-color: black;}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36
Challenge Information:
Design a Blog Post Card - Design a Blog Post Card