Tell us what’s happening:
I try to run test but this error happen everytime.
9. Your .blog-post-card element should have a white background.
So I go to CSS and try change backgroun-color and it’s work.
Then I go back change it to white and error happen again? idk why this happen?
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="Notebook screen showing an email">
<div class="post-content">
<h2 class="post-title">Web developer</h2>
<p class="post-excerpt">HTML CSS Web dev</p>
<a class="read-more" href="www.google.co.th" target="_blank">Read More</a>
</div>
</div>
</body>
</html>
/* file: styles.css */
.blog-post-card {
background-color: white;
border-radius: 10px;
width: 300px;
text-align: center;
}
.post-img {
width: 100%;
border-bottom: 2px solid;
margin-bottom: 10px;
}
.post-content {
padding: 20px;
}
.post-title {
color: navy;
margin: 10px 0;
}
.post-excerpt {
color: #555;
margin: 10px 0;
}
.read-more {
color: white;
background-color: blue;
margin: 10px;
padding: 10px 20px;
border-radius: 5px;
display: inline-block;
text-align: center;
}
.read-more:hover {
background-color: darkblue;
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36
Challenge Information:
Design a Blog Post Card - Design a Blog Post Card