Quite a few of your tags (ul, li, also div) aren’t closed properly in the code you posted. Browsers will try to interpret this in some way, but not necessarily the way you intended it, so this might be a cause for your problem.
I fixed those unclosed tags in the snippet below. It’s hard to check your CSS, since most of the CSS rules you posted don’t apply at all in the snippet, since they use the class .header--nav-links and similar in their selectors which isn’t included in your HTML code.
Nevertheless, maybe the edited HTML code already fixes the display problem you are mentioning.
I have 2 versions of a website i made one in english one in french. The navbar for the english version works perfectly on my computer and live on the internet so When i test the french website version on my computer the navbar works exactly as it should yet when live on the internet it’s stuck at the top of the page, where as its suppose to be about 5 cms under the top. Here is the html and css code:
if all else is the same, I’d try to get rid of special characters and spaces in the file names; those need encoding and depending on file system, web server etc. might not be found. This might or might not be your problem, but in general, I’d try to go with simple non-special character file names as a base rule to avoid encoding issues even in cases where it should work in principle. Example “à propos de.html” -> “a_propos_de.html”
Comment posted by stackoverflow.com/a/52558801/2430549
You may have an encoding issue, as Frank said. But it may be the file itself, and its content, and not the filename. The accented chars, if you remove them, does it work? That’ll tell you it’s an encoding problem. I have a full solution to fixing this here:
Comment posted by Marco Gianni
@FrankHopkins i agree with your advice so i changed the characters as you suggested but it didnt work. HoldOffHunger yes i removed the accented chars from the html and changed the file names but it didnt work.
Comment posted by Marco Gianni
@HoldOffHunger ok i’m currently using headers so using other headers like php is a bit foreign for me. How do you install them ? Thank you
Comment posted by HoldOffHunger
Hey, Marco Gianni: PHP headers like
Comment posted by Marco Gianni
something interested happened when i used your code actually. i copied the code it didnt change anything. So i copied the code then also removed the accents as well for example hébergement-partagé and the entire navbar disappeared, i refreshed the page a few times getting the same result.
Comment posted by Johannes
My answer wasn’t intended as code that can by copied 1:1, but to show (in a reguar list with sub-lists) that the HTML closing tags need to be fixed…
Comment posted by Marco Gianni
Thanks i didnt see them before, i made the adjustments