Design a Blog Post Card - Design a Blog Post Card

Tell us what’s happening:

the task 17 does not pass
display inline-block for .read-more element

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">
    <link rel="stylesheet" href="styles.css">

    <title>Blog Post Card</title>
</head>
<body>
    <div class="blog-post-card">
        <img class="post-img" src="https://cdn.freecodecamp.org/curriculum/labs/cover-photo.jpg" alt="Web developer edits code using Pc">
        <div class="post-content">
            <h2 class="post-title">Learn AI with Python in 2025</h2>
            <p class="post-excerpt">Get Started. Whether you're new to programming or an experienced developer, it's easy to learn and use Python. Start with our Beginner's Guide ...</p>
            <a class="read-more" href="https://www.python.org/" target="_blank">Read More</a>
        </div>
    </div>
</body>
</html>
/* file: styles.css */

body {
  font-size: 2rem;
  background-color: #3776ab;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items:center;
  height: 100vh;  
}

.blog-post-card {
  background-color: white;
  border-radius: 30px;
  width: 40vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items:center;
  text-align: center;
}

.post-img {
  width: 100%;
  height: 40%;
  border-bottom: solid 10px #B0E0E6;
  border-radius: 30px 30px 0px 0px;
}

.post-content {
  font-size: 3rem;
  width: 100%;
  height: 60%;
  padding: 5px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items:center;
}

.post-title {
  color: #00008B;
  margin:5px;
}

.post-excerpt {
  color: #1b1b32;
  padding: 15px;
  margin:5px;
  line-height: 1.5;
}


.read-more {

  display: inline-block;
  text-decoration: none;
  background-color: #ffd343;
  color: #1b1b32;
  padding: 15px;
  margin: 15px ;
  border-radius: 10px;
}

.read-more:hover {
  background-color: #1E90FF;
}

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36

Challenge Information:

Design a Blog Post Card - Design a Blog Post Card
https://www.freecodecamp.org/learn/full-stack-developer/lab-blog-post-card/lab-blog-post-card

Look for other CSS selectors that set display and experiment with removing that line.

In general you should not add anything that’s not expressly written in the instructions.

Ok
Thank you. I’ll try

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.