Jump to content

Widget padding

Recommended Posts

Site URL: https://mycarbonzero.org/home

Hi, I'm having a couple of issues with an embedded widget...

A photo of the widget is attached, and the code I used to embed it is here:

<iframe src="https://co2widget.com/embed/" width="100%" height="450" frameborder="0" scrolling="no" title="live CO2 PPMr"></iframe>

 

Firstly, even after editing and playing around with the height parameter, there is still large white padding above the widget, is there any way to get rid of this? 

Secondly, when I view the page on a tablet or phone, the white padding above is no longer there, but the widget isn't fully visible, as it changes shape. Any ideas on how to approach both of these issues?

Thanks

 

Widget.PNG

Link to comment
  • Replies 1
  • Created
  • Last Reply

Hi. Add to Design > Custom CSS

/* Fix iframe */
@media screen and (min-width:992px) {
div#block-yui_3_17_2_1_1616257664900_13099>div {
    overflow: hidden;
}
div#block-yui_3_17_2_1_1616257664900_13099 iframe {
    margin-top: -100px;
}}
div#block-yui_3_17_2_1_1616257664900_13099 iframe {
    height: 860px;
}

 

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.