Nav issue

Problem: I'm trying to make nav bar the same as index.html, but it seems to be stagnant. What I've tried: Copying and pasting the nav from index.html into booking.html and it barely worked. Error Message: N/A https://codepen.io/NaeWhip/pen/jOjLqGb
8 Replies
xilli
xilli3mo ago
How does your index.html look like? What kinda project setup do you have? Native HTML or angular / react?
Chris Bolson
Chris Bolson3mo ago
I think that you are going to have to give more context. I presume that you want to have the navigation the same on both pages, index.html and booking.html. In the simplest scenario you just copy the html block from one file to the other * and ensure that they both load the same CSS file where the nav styling is defined. Assuming as the context (ie the position within the HTML) is the same, the nav should look the same on both pages. If you are doing this, in what way are the different? Can you show the relevant code for both of your html pages? * Ideally this nav element would be a component that is loaded to each of the files so you only have one version to maintain but I think that that may go beyond the scope of this question. As an aside note, looking at your codepen I would also recommend that you use the <button> element for the hamburger toggle. You shouldn't add eventlisteners to divs, if an element requires user interaction it should generally be a button of some sort.
naewhip
naewhip3mo ago
Nav bar is supposed to look like the pictures below, but the navigation bar seems stagnant.
naewhip
naewhip3mo ago
No description
No description
naewhip
naewhip3mo ago
Right now, it looks like this, I've also put the products section as an example when you scroll down
naewhip
naewhip3mo ago
No description
Want results from more Discord servers?
Add your server