Search code examples
htmlgoogle-sites

How can I do to an embed script inside Google Sites, be responsive designed?


I created a full web-site HTML script and put it in Google Sites and published this site. Unhappy, when I see this site with my mobile It's not loading as responsive designed, even the HTML code being responsive designed. It seems that when I load the script inside google sites, it loads a full static block of code that do not change the size. How can I fix it? I already looked if somebody have this same issue, and I have found one guy that had the same problem, but nobody could answer him.

Here is the difference between the page been loaded in mobile and desktop

Here is how the page loads in google sites: https://sites.google.com/view/testetexad95/in%C3%ADcio

How the page loads at google script: https://script.google.com/macros/s/AKfycbwZuHF6qvj37rTs8SSp60BAtNprDZV3DaIuBNPwIcjx0Y8a9jgDj5YdCi0f-fx3zZsA/exec

Code: https://github.com/GeraldWicks/ecommerce_issue/blob/main/index.html

I'm quite sure that this is not the script's problem, but it is some configuration from google sites that makes it !


Solution

  • Thanks for the update, based on those links i'm not seeing the site as responsive but i can see the issue you're raising. It's due to the fact that on the Google Script test it's scaling the desktop view down, on the Google Sites test it's reducing the size of the page to a mobile device.

    In short the script one, on mobile, is showing the desktop site scaled down. The Google Sites version is showing it responsive on mobile but as the site isn't responsive that's why you get the issue.

    I don't know if the iFrame resizing is something you control or not but making your site responsive overall will help fix how it's displaying on the Google Site (as this seems correct to me). Take a look at for guidance on this https://www.w3schools.com/html/html_responsive.asp