Jump to content

Navigation on Safari on mobile/mobile view gone after adding code blocks with ads from adsense!

Recommended Posts

Site URL: https://www.jonasstensgaard.com/shop/funny-home-is-where-quote-bundle-svg-cut-files-family-quote-craft-file-funny-quote-design

I'm on the York template.

I've just started implementing Adsense on my website and have added ads via code blocks but I noticed a problem: When I add the ad blocks it destroys the way the navigation works on mobile. When I say destroy I mean you can click the hamburger menu but it looks like the menu is empty. In fact it looks like it's empty when in reality a LOT of space has been added above and below the links. The problem exists both in real-life viewing as well as through my squarespace website editor.

1520016175_Skrmbillede2020-02-06kl_15_38_38.thumb.png.e9d5a5b776adc8ccd197c3a01ab773f3.png

I contacted Squarespace support and the guy I spoke to found out the problem only exists when using Safari. I tried clearing the cache and all that by following these instructions: https://support.squarespace.com/hc/en-us/articles/115004581087 But that didn't solve the issue. I also tried removing my code from the site-wide Code Injection as well as the custom CSS but that didn't change anything. Also, on pages similar to the one I linked to where I haven't added any ad code block the problem doesn't exist.

So it has something to do with the way Safari handles the code block with the ad code maybe? Any idea as to how I can solve this problem?

EDIT:

So, I managed to do a sort of fix where I added custom CSS that targeted the container of the menu:

.overlay-nav-container {
height: 0px;
}

I just set the height to 0px and that fixed the problem - but you can still scroll and scroll because when I inspected the site code it said the container height was more than 5000px! Why does it say that? And is there another and more proper way to fix this? And is the code I added safe enough to use or will it create problems for me in some other part of my site?

Link to comment
  • Replies 0
  • Created
  • Last Reply

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.