Building Product Landing Page

Tell us what’s happening:
So every time I add the position:fixed; in the header it won’t scroll down but when I add it on the #nav-bar I need to remove the position:absolute; I appreciate your help I am writing spaghetti code right now…

Your code so far
here is the link of my codepen https://codepen.io/hernando-joven/pen/oNXpabJ

Your browser information:

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

Challenge: Build a Product Landing Page

Link to the challenge:
https://www.freecodecamp.org/learn/responsive-web-design/responsive-web-design-projects/build-a-product-landing-pagestrong text

I think navbar starting after the image is the problem, that’s why its takes the

    elements to the next line.

    adding display:inline-block to the navbar solved that problem. I dunno if you are looking for this.

1 Like