Tell us what’s happening:
Describe your issue in detail here.
** Having issues with my >project-title
selector not putting the gray box around the project title… Cant figure out what i did wrong
Your code so far
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<link rel="stylesheet" href="styles.css"></link>
</head>
<body>
<nav id="navbar">
<ul id="nav-list">
<li>
<a href="#welcome-section"> About</a>
</li>
<li>
<a href="#projects"> Work</a>
</li>
<li>
<a href="#contact"> Contact</a>
</li>
</ul>
</nav>
<section id="welcome-section" class="welcome-section">
<h1>Hey Algo Hussle</h1>
<p>am a < web developer /></p>
</section>
<section id="projects" class="projects">
<h2>These are some of my projects</h2>
<div class="projects-grid">
<a href="">
<img src="https://cdn.freecodecamp.org/testable-projects-fcc/images/tribute.jpg" alt="" class="project-img/>
<p class="project-title">Tribute Page</p>
</a>
<a href="">
<img src="https://cdn.freecodecamp.org/testable-projects-fcc/images/tribute.jpg" alt="" class="project-img/>
<p class="project-title">Tribute Page</p>
</a>
<a href="">
<img src="https://cdn.freecodecamp.org/testable-projects-fcc/images/tribute.jpg" alt="" class="project-img/>
<p class="project-title">Tribute Page</p>
</a>
<a href="">
<img src="https://cdn.freecodecamp.org/testable-projects-fcc/images/tribute.jpg" alt="" class="project-img/>
<p class="project-title">Tribute Page</p>
</a>
<a href="">
<img src="https://cdn.freecodecamp.org/testable-projects-fcc/images/tribute.jpg" alt="" class="project-img/>
<p class="project-title">Tribute Page</p>
</a>
<a href="">
<img src="https://cdn.freecodecamp.org/testable-projects-fcc/images/tribute.jpg" alt="" class="project-img/>
<p class="project-title">Tribute Page</p>
</a>
</div>
</section>
<section id="contact" class="contact"></section>
</body>
</html>
/* file: styles.css */
body{
font-family: 'poppins', sans-serif;
margin: 0;
padding: 0;
}
#navbar{
background-color: #be3144;
position: fixed;
top:0;
left: 0;
width: 100%;
display: flex;
justify-content: flex-end;
}
#nav-list{
display: flex;
flex-direction: row;
}
li{
list-style: none;
}
a{
color: white;
text-decoration: none;
font-size: 1.5em;
padding: 1rem 2rem;
}
a:hover{
background-color: #45567d;
}
#welcome-section{
width: 100%;
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-color: #000;
background-image: linear-gradient(
62deg,
#3a3d40 0%,
#181719 100%
);
}
h1{
color: white;
font-size: 4rem;
font-weight: 900;
}
#welcome-section{
color: #be3144;
font-size: 2rem;
font-style: italic;
font-weight: 100;
}
.projects{
margin: 0;
padding: 8rem 2rem;
text-align: center;
background-color: #45567d;
}
.project > h2{
font-size: 3.2rem;
color: white;
}
.project_img{
height: calc(100% - 6.8rem);
width: 100%;
object-fit: cover;
}
.project-title{
color: white;
width: 100%;
background-color: #303841;
padding: 1em;
}
.project-grid{
display: grid;
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
grid-gap: 4rem;
width: 100%;
max-width: 1280px;
margin: 0 auto;
margin-bottom: 6rem;
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36
Challenge: Personal Portfolio Webpage - Build a Personal Portfolio Webpage
Link to the challenge: