We use cookies to make HubSpot's community a better place. Cookies help to provide a more personalized experience and relevant advertising for you, and web analytics for us. To learn more, and to see a full list of cookies we use, check out our Cookie Policy (baked goods not included).
Nov 23, 2020 9:35 AM
I have embedded a HubSpot form on our website using following steps:
No matter what I do, the iframe keeps a fixed width of 300px. Please note that the parent divs are both wide enough.
What I have tried:
What am I missing here?
Solved! Go to Solution.
Nov 26, 2020 7:13 AM
Hi Ben,
Sorry for the late reply. We fixed it by using a different wrapping element and applying flex on it. Super weird but we are happy it works 🙂
Cheers,
Pierre
Nov 23, 2020 8:04 PM
Can you try setting the width of the form ID ( #hbspt-form-1606179519000-7983280184 ) in your CSS? If you are not able to do that you may need to open a ticket with support and inquire about the Wordpress plugin because it's definitely in that as your form is setup properly and reviewing your site code is fine as well from all I can see. So there's definitely something in that plugin causing this.
Nov 26, 2020 7:13 AM
Hi Ben,
Sorry for the late reply. We fixed it by using a different wrapping element and applying flex on it. Super weird but we are happy it works 🙂
Cheers,
Pierre
Nov 23, 2020 11:14 AM
2 Things.
First, the use of // without a protocol in front is valid. It is for the host to serve up the protocol. So this is not a bug and should retrieve the file from the https protocol, otherwise you would end up with a mixed content error meaning you are trying to serve unsecure content on a secure site.
Second, can we see your page in question? There is nothing in the code that I am aware of that would restrict the width of the form and it should always stretch to the full width. It could be possible that there is something overriding the CSS on your page that is causing the restriction.
Nov 23, 2020 11:16 AM
Hi Ben,
Thanks for the quick reply! Didn't know about the validity of that syntax - seems solved then.
Cheers,
Pierre
Nov 23, 2020 9:53 AM
There is also one thing I'd like to point out (I guess it's a little bug from your side): when copying the Embed code I think there is a https missing in front of the //js