Product Landing Page - Build a Product Landing Page

hello, i have a problem with the nav link i have the href attribute but its not working and idk how to do the flexbox please help me, thanks :grin:

  **Your code so far**
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<link rel="stylesheet" href="styles.css">
<header id="header">
  <meta charset="UTF-8"></meta>
  <link rel="stylesheet" href="styles.css">
  <img id="header-img" src="">
  <nav id="nav-bar">
    <nav class="nav-link" href="#features"></nav>
    <nav class="nav-link" href="#how-it-works"></nav>
    <nav class="nav-link" href="#pricing"></nav>
<iframe id="video" src=""></iframe>

<form id="form" action="" >
<input id="email"placeholder="enter your email address" type="email" name="email"></input>
<input id="submit" type="submit"></input></form>

/* file: styles.css */
justify-content: center;

  **Your browser information:**

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

Challenge: Product Landing Page - Build a Product Landing Page

Link to the challenge:

What do you want your nav-link to do that it is not doing right now?

the step is asking me to add a href attribute which i have but my code isnt passing for somreason

Do you mean this part is not passing?

  1. When you click a .nav-link button in the nav element, you are taken to the corresponding section of the landing page

yes that part and the flexbox

Have you tried clicking the links to see if they are working?

If you look at your links, what do you think the test is asking you to do (other than just create a link)?

i have tried copying the links in the page i was given but its not working im lost

Okay. You should not copy. As you see copying does not help.

What does a link do?
(Why do people make links?)

to move from one page to another ?

Yes. In this case though, the links are “internal links”.
We know this because the test says:

So these links should take us to a section inside your page. Specifically each link should link to the corresponding or matching section.

So do you think your links are doing that?
What should you do next?

take the links from the corresponding page and put them in a href attribute in the nav link ??

You already have some links. They don’t work though right?
They need somewhere to go.
So create the required sections and give them the id that matches the links that you have in the navbar.

which is an a element right ?

ok no i understand now a section element thank you

but what about the flexbox

The thing to remember about flexbox is that only the direct child elements of the flex container will become flex items. You’ve made your html body a flex container, so you need to thing about which child elements will be affected.
You can create more than 1 flex container if needed.

1 Like

Hi, you should put some into de nav element like "a or li " element, after you have to add the href with the ID where you want go to.
For example:

<nav> // this wrapper for the links or content text
<ul> // this element is for the good pratices, but not is necessary
// then, into <nav>, in this case <ul> you put the text with href
<a href="your link or your section page (#form)">
1 Like

I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').