Copy link to clipboard
Copied
When I cut and paste my navigation code, it works for all 12 pages on my website except two: home page and contact page. The drop down menu doesn't work for one dropdown item and the hamburg doesn't work. I've tried everything I can think of, including deleting the rest of the coding for both pages to see if there was an error somewhere. Any ideas?
Copy link to clipboard
Copied
What's the URL to your problem page online please?
Meanwhile, validate the code in your documents and fix all reported errors. Go to Window > Results > Validation. See screenshot.
Copy link to clipboard
Copied
I haven't published the website yet.
Copy link to clipboard
Copied
here is screen shot of my validation results. Again, site is work in progress. Does any of this explain why navigation doesn't work on this page when it does on my other pages with same coding?
Copy link to clipboard
Copied
Unclosed tags would play a large factor in elements misbehaving.
Copy link to clipboard
Copied
#1 If you can't temporarily publish your work online to a TEST folder on your server, we can't see the problem.
#2 Unbalanced opening and closing tags can certainly effect how your layout renders in browsers. For best cross-browser rendering, code errors should be avoided. Also rename your files without spaces. In HTML5, filenames may contain underscores or hyphens but no special characters or spaces.
#3 Try opening a working document. Go to File > SaveAs > new_contact.html. Repeat with new_index.html. Adjust content accordingly. Delete non-working files.
Copy link to clipboard
Copied
I guess when you talk about copy and paste, that's just the portion of the navigation menu you're talking about.
A few questions then:
1- did you also include the necessary script files, css and other external files in the pages where the menu doesn't work?
2 - did you include the initialization script (usually at the bottom of the page or in the main javascript onload) to instantiate the menu
3 - when the menu HTML code is pasted in the hosting page, is it well pasted nested within a welcome tag and not straddling between two bad tags?
4 - are the home and contact pages at the same level as the other pages that work correctly ? and if not could break the external file paths