Product Landing Page Style problems

Hey guys this is not an actual error or something is about my page style and things.

1.So I don’t know why my nav-bar doesn’t want to be fixed

2.When I zoom the background image stops and then white backg appears It shouldn’t.

1.So I don’t know why my nav-bar doesn’t want to be fixed

What have you tried?

2.When I zoom the background image stops and then white backg appears It shouldn’t.

You might look at this.

1 Like

nav-bar { position: fixed; top: 0; width: 100%; }

the problem with the background worked thaks a lot, but still i need that navbar thing.

You need to read up on positioning. You declare positioning but don’t use top, right, bottom, or left. Then the navbar is in another element with different positioning. use positioning sparingly when other methods don’t work for the situation.

1 Like

tlc35us i did it mate, but now I have another question I want to make all my content excluding the navbar centered like in a div to be centered and with some specified width but the thing is that my <p> goes over the div.

https://codepen.io/iamaxi25/pen/WNEoRvM here

nevermind I did it thanks guys.

Well you can center an element whose display is block with left and right margin auto. Then there is text-align:center; for things that behave like text.

Kinda strange that you have a p in a ul what are you trying to do?

I want that to be my text for each photo in the list.

If you mean a caption for each photo then you can have a div that contains 1 img and 1 p wher the img is set to display block. Then you don’t need the ul. I would suggest a shorter max-width for the paragraph to make it look better.
If you mean a single caption for three photos then put the paragraph last and use a containing div for the photos.
If you want to be semantically correct I suggest using figure and figcaption.