Tell us what’s happening:
I can’t seem to get test 18, (“You should target .read-more and set its margin property”), to pass. I don’t see my error, anyone see what I’m doing wrong?
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="side persepctive of someone working on a laptop with a document open">
<div class="post-content">
<h2 class="post-title">Blog Post Title</h2>
<p class="post-excerpt">This text summarizes the blog post</p>
<a class="read-more">Read More</a>
</div>
</div>
</body>
</html>
/* file: styles.css */
body {
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background-color: #AE4f53;
}
.blog-post-card {
height: 50vh;
width: 50vw;
border: 3px solid black;
border-radius: 10px;
overflow: hidden;
background-color: white;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
}
.post-img {
height: 50%;
width: 100%;
object-fit: cover;
border-bottom: 2px solid black;
}
.post-content {
width: 100%;
height: 50%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 10px;
margin: 2px;
}
.post-title {
color: brown;
margin: 10px;
}
.post-excerpt {
color: brown;
margin: 10px;
}
.read-more {
display: inline-block;
color: blue;
background-color: beige;
margin: 10px;
padding: 5px 10px;
border-radius: 4px;
border: 2px solid grey;
}
.read-more:hover {
cursor: pointer;
background-color: pink;
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/153.0.0.0 Safari/537.36
Challenge Information:
Design a Blog Post Card - Design a Blog Post Card