Jump to content

Multiple Language Header

Go to solution Solved by tuanphan,

Recommended Posts

Recently I have had a problem on my site with a code that has been working all the time.

I created a bilingual menu with code in which I did not display pages/folders in the menu.

With the code I made the even and odd pages disappear. Recently, however, the code no longer works and all menu items are displayed on the odd-numbered pages and no menu items at all on the even-numbered pages. The problem only affects the mobile version.

I don't know what the problem is or how I can adjust the code so that it works again.

These are the codes I used and I put on every page setting:

 

<style>/*Zweisprachiges Menü*/

.header-nav-list>.header-nav-item:nth-child(even) {

    display: none;

}

.header-menu-nav-folder[data-folder="root"]>.header-menu-nav-folder-content>div:nth-child(even) {

    display: none;

}

</style>

 

&

 

<style>/*Zweisprachiges Menü*/

.header-nav-list>.header-nav-item:nth-child(odd) {

    display: none;

}

.header-menu-nav-folder[data-folder="root"]>.header-menu-nav-folder-content>div:nth-child(odd) {

    display: none;

}

</style>


Maybe someone can help me?

Link to comment
  • Replies 2
  • Views 1.3k
  • Created
  • Last Reply

Top Posters In This Topic

  • Solution

First code should be

<style>
.header-nav-list>.header-nav-item:nth-child(even) {
    display: none;
}
[data-folder="root"]>div:first-child>div:first-child>div:nth-child(even) {
    display: none;
}
</style>

Second code should be

<style>
.header-nav-list>.header-nav-item:nth-child(odd) {
    display: none;
}
[data-folder="root"]>div:first-child>div:first-child>div:nth-child(odd) {
    display: none;
}
</style>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.