I have a question in "Product Landing Page" test

hi
i passed this test completely but i have 2 unaswered question

  1. why my article H1 header is shown under my header?
  2. why the color of my header doesn’t fill left side of logo?
    https://codepen.io/Ali_Gh_/full/abBeemx

Hi Ali,

nice to meet you! :wave:

Your header has position: fixed. This means that a small part of the article is behind the header.

Fixed: The element is removed from the normal document flow, and no space is created for the element in the page layout.

Source

You can give the header a height and add some margin to the top of the article.


Your browser has a built-in styling. You can set the body to margin: 0 to remove this small margin around the body.

tnx for you help

You can give the header a height and add some margin to the top of the article.

but why this user’s code works??
https://codepen.io/Majestic2769/pen/NWGZZMw

Because they exactly do what I said: margin-top: 50px for the section with id hero.

1 Like

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