Jump to content

Make an embedded iFrame bigger

Recommended Posts

Site URL: https://oscollective.org/donate

I've embedded an iFrame using a code block. You can see it here:

https://oscollective.org/donate

The problem is, it's showing up in a tiny box instead of the full width. I want it to expand to the whole page to show all its content. How do I make it bigger? It doesn't have any spacers or anything making it that small. It's the only element on the page.

The code I embedded is very simple, just:

<iframe src="https://opencollective.com/embed/opensource/donate" />

I asked the developers of the embedded iFrame and they said the size isn't determined by the iFrame itself, but how my site displays it, so I need to fix it on my side.

Link to comment
  • 2 weeks later...
  • Replies 1
  • Views 755
  • Created
  • Last Reply
On 3/15/2021 at 9:43 AM, alanna-oc said:

Site URL: https://oscollective.org/donate

I've embedded an iFrame using a code block. You can see it here:

https://oscollective.org/donate

The problem is, it's showing up in a tiny box instead of the full width. I want it to expand to the whole page to show all its content. How do I make it bigger? It doesn't have any spacers or anything making it that small. It's the only element on the page.

The code I embedded is very simple, just:


<iframe src="https://opencollective.com/embed/opensource/donate" />

I asked the developers of the embedded iFrame and they said the size isn't determined by the iFrame itself, but how my site displays it, so I need to fix it on my side.

Hi,

Add to Design > Custom CSS

/* Donate iframe */
div#block-yui_3_17_2_1_1615492631395_3698 {
    width: 100%;
}
div#block-yui_3_17_2_1_1615492631395_3698 iframe {
    min-height: 1000px !important;
}

 

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

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.