Jump to content

Code injection only appearing on mobile site?

Recommended Posts

Site URL: https://www.extremekidsandcrew.org/

I am attempting to add a bit of code that would add a Google Translate widget to the header of my webpage. However, the widget only shows up on the mobile version of my site and I'm unable to figure out why. Does anyone know why this might be happening? For reference, here's the site in question: https://www.extremekidsandcrew.org/

And the widget code:

<div id='google_translate_element'></div>
<script>
  function googleTranslateElementInit() {
    new google.translate.TranslateElement({pageLanguage: 'en', layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL}, 'google_translate_element');
  }
</script>
<script src='//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit' type='text/javascript'></script>

 

Link to comment
  • Replies 1
  • Views 211
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi. Your desktop header overlaps GG translate, so you will see this problem.

Add this code to Design > Custom CSS to fix problem

div#google_translate_element {
    position: relative;
    z-index: 300000000;
    text-align: right;
}

 

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.