Jump to content

Centering and scaling embedded Google Sheets on my Squarespace website

Recommended Posts

Hey guys,

I have an embedded Google Sheets page on my website, which refuses to scale and centre in the code block that I have placed it in. The goal is to have the image/text from the Google Sheet centred on the page and automatically scaled depending on the device size so that the user can see the entire image without scrolling.

At the moment, on a desktop, it does not centre. On a phone, it does not scale and shows the horizontal scrolling bar.

Site URL: https://www.cycaswj.com.au/prayer-times

This is what code I have in the HTML Code Block:

<div id="prayer-time-table">
  <iframe id="scaled-prayer-times"  src="https://docs.google.com/spreadsheets/d/e/2PACX-1vSEIDa9hA05m0NpIz3nUl7gG_84uNqbG1jSMcuG4Exe_PjCr1b4tkuImuqF9fS4OZF0xwOFu0byUKzd/pubhtml?gid=1418347722&amp;single=true&amp;widget=false&amp;chrome=false&amp;headers=false"> </iframe>

This is the CSS for the sections:

#prayer-time-table {
  height: 822px;
  padding: 0;
  overflow: hidden;

#scaled-prayer-times {
  width: 100%;
  height: 100%;
  border: none;

I have tried using <center> tags and adding position: to the CSS, and have scoured the web thoroughly and cannot find anything that applies here.

Thanks in advance for your help!

Edited by ShoaibF
Added site URL
Link to comment
  • Replies 2
  • Views 792
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • 2 weeks 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.