Responsive Web Design Projects - Build a Product Landing Page

Tell us what’s happening:
Describe your issue in detail here.

I don’t get this: “Your #nav-bar should always be at the top of the viewport.”

   **Your code so far**
/* file: index.html */
<link rel="stylesheet" href="styles.css">
<header id="header"> 
 <img id="header-img" src="">
<nav id="nav-bar">
       <li><a href="" class="nav-link">Home</a></li>
       <li><a href="" class="nav-link">Contact</a></li>
       <li><a href="" class="nav-link">Donaciones</a></li>
<iframe width="560" height="315" src="" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen id="video"></iframe>
   <form id="form" action="">
     <input id="email" placeholder="Email" type="email" name="email">
     <input id="submit" type="submit">
/* file: styles.css */
body{background: linear-gradient(yellow, orange, red)}
ul{list-style-type: none;}
li{float: left;
padding: 16px;

   **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: Responsive Web Design Projects - Build a Product Landing Page

Link to the challenge:

You don’t want to use HTML tags in the styles.css file. CSS syntax only.

Browser’s usually add a default margin to the body, so I would recommend you create a CSS rule that zeroes out the margin on the body.

Then, you need to use some sort of positioning to make sure the <nav> is always touching the top of the window.

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