Tell us what’s happening:
I keep being told that my .read-more needs a hover effect. I feel like I have coded this correctly. when I hover over the button in the editor the color changes. when I focus the button I get an outline. but the unvisited link is supposed to be red and isn’t and if I code in a :visited pseudo-class the link will automatically turn to the color assigned to that selector.
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 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="image description">
<div class="post-content">
<h2 class="post-title">This the title of the blog</h2>
<p class="post-excerpt">This is an excerpt from the blog post. read it all. take it in.</p>
<a class="read-more" href="https://html.com/attributes/">Read More</a>
</div>
</div>
</body>
</html>
/* file: styles.css */
.blog-post-card {
background-color: white;
border-radius: 10px;
width: 500px;
text-align: center;
}
.post-img {
border-bottom: 5px solid red;
width: 100%;
}
.post-content {
padding: 20px 20px 20px 20px;
}
.post-title {
color: green;
margin: 50px 50px 50px 50px;
}
.post-excerpt {
color: hotpink;
margin: 50px 50px 50px 50px;
}
.read-more {
display: inline-block;
border-radius: 50px;
background-color: yellow;
margin: 40px 40px 40px 40px;
padding: 20px;
}
.read-more:link {
color: red;
}
.read-more:hover {
color: grey;
}
.read-more:active {
color: black;
}
.read-more:focus {
outline: 3px solid black;
}
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0.1 Safari/605.1.15
Challenge Information:
Design a Blog Post Card - Design a Blog Post Card