Jump to content

Stop header items from sliding on page loading

Recommended Posts

Posted

Site URL: https://banjo-recorder-36fe.squarespace.com/knows

Dear all,

I am experiencing an issue with my 7.1 website concerning the navigation items.

When the page loads, the items quickly slide to the left just before returning to their desired position. I suspect that this is related with the amount of CSS custom code it has to read before opening the page. 

The password for the website is Musa.

Any help would be really appreciated!

All best,

Miguel

  • Replies 7
  • Views 1.4k
  • Created
  • Last Reply

Top Posters In This Topic

Posted
On 4/3/2021 at 12:29 AM, MiguelFerrao said:

Sorry @tuanphan, had to change it to musa. No capitals.

I see you used code in Code Injection to hide some items on navigation. 

You can remove style tag, then move it into Design > Custom CSS. Then check again.

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!)

Posted

Hi @tuanphan and thank you for your answer.

I am hiding navigation items using code injection because those hidden elements vary accordingly to the language of each page. I am building a bilingual website. If I move the code in Code Injection into Design > Custom CSS it will change website as a whole and it will not allow to hide half of the elements in one language and show these same elements in the other language.

Let me explain: 

To accomplish a bilingual 7.1. website using navigation this way and to have a button to change language on each individual page (the button seems the same but it links to the translated page where you are, so it needs to use specific code each time) I had to use the "add a button to navigation" official option and to add a script to allow and addition of multiple buttons to navigation. But, unfortunately, I couldn't find any solution for having this "official" button to link to different pages depending on the page you are, as so, I had to put something on the "button text" label and to hide this button with Custom CSS.  Then, with the script, I could add as many buttons as I wanted with as many links and description I wanted.

This all fine, the only is that, sometimes, the hidden button appears for a brief moment and changes the set-up of the navigation.

Any way, this issue of having the navigation sliding to the left and then to the right, for a second, when loading pages, was already occuring on my 7.0 version of this website (www.musaparadisiaca.net), and I couldn't find any solution to this problem either.

Any ideas?

Thanks a lot.

  • 2 years later...

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.