Tell us what’s happening:
having trouble with the nav-link part. Each .nav-link
element should link to a corresponding element on the landing page (has an href
with a value of another element’s id. e.g. #footer
). what do i do? thats the only part i am failing to complete.
**Your code so far**
/* file: index.html */
<!DOCTYPE html>
<html>
<head>
<meta charset='UFC-8'>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="styles.css">
<title>Product Landing Page</title>
</head>
<body>
<header id='header'>
<img id='header-img' src='https://picsum.photos/200/300' />
<nav id='nav-bar'>
<a class='nav-link' href='#footer'>Features</a>
<a class='nav-link' href='#services'>How It Works</a>
<a class='nav-link' href='#bottom'>Pricing</a>
</nav>
</header>
<video id='video' src='https://youtu.be/y8Yv4pnO7qc'></video>
<form id='form' action='https://www.freecodecamp.com/email-submit'>
<input name='email' id='email' placeholder='type your email address' required type='email'>
<a href="https://www.freecodecamp.com/email-submit"><input type="submit" id="submit" value="submit" name="submit"></a>
</form>
</body>
</html>
/* file: styles.css */
navbar{
position: top;
}
header {
position: fixed;
width: 100%;
}
@media (max-width: 650px) {
#ul {
flex-direction: column;
}
}
header {
position: fixed;
top: 0;
min-height: 15px;
padding: 0px 20px;
display: flex;
justify-content: space-around;
align-items: center;
background-color: #ab8103;
@media (max-width: 600px) {
flex-wrap: wrap;
}
}
**Your browser information:**
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36
Challenge: Build a Product Landing Page
Link to the challenge: