The menu behaves abnormally. The child sub-items of the second level are visible only when clicking on the link to the parent element of the first level. The second time this happens on two independently developed sites. Tell me please!
Closed due to the fact that the essence of the issue is not clear to the participants of Vadizar , rjhdby , vp_arth , ThisMan , Sasha Omelchenko 6 Mar '17 at 12:20 .
Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .
- Two times out of two - this is symptomatology ... maybe it should be so? - Akina
- It would be nice to attach sites - Alexey Shatrov
- @AlexeyShatrov second site I straightened out like that. He is now working, but I generally can’t guess what I did to him. That site where it is now manifested is located on the local host. Tomorrow I will upload it to the server and drop the link. Thank you for your attention 🤝 - Ivan Hanenko
1 answer
Your problems are in the styles of your template, give an example: suppose you have a menu structure
<ul> <li><a>Menu 1</a></li> <li><a>Menu 2</a> <ul> <li>Submenu</li> <li>Submenu</li> </ul> </li> <li><a>Menu 3</a></li> </ul> According to the standard, all parent LI given a deeper parent class, but the child UL in styles is prescribed display:none; , when you go to the link Menu 2 this LI gets a new class 'active' and in all likelihood you have spelled out in styles
li.active ul{ display:block; } and for this reason you see the open submenu when you enter the parent link. If you want to prevent the display of all child menus, find and edit styles.
Updated
Or go to the menu module, look in the settings what values are set
1.Start Level
2. Show Sub-menu Items Yes / No
- DOM items are not displayed. Those. does not load them from the database. - Ivan Hanenko
- ie, on other pages in HTML the menu has no child menu, and when you are in the parent menu, does it show these items in HTML? - Arsen
- Yes. This is really anomalous) - Ivan Hanenko
- oneDo you use the standard menu module? or third-party? Go to the menu module, look in the settings what values are set 1.Start Level 2. Show Sub-menu Items Yes / No - Arsen
- onePlease always happy to help! ) - Arsen