Blog, Website & Page Publishing

ArntRune
Member

Can't set full with for Iframe in Hubspot CMS

Trying to insert a iframe into a module through the source code function. Unfortunately it seems all attempts at settings a full with (100 %) setting gets converted into a fixed with wheen applied. Is there any way to fix this, or any other way to insert a external webpage into an Hubspot CMS website/landingpage? 

0 Upvotes
1 Reply 1
himanshurauthan
Thought Leader | Elite Partner
Thought Leader | Elite Partner

Can't set full with for Iframe in Hubspot CMS

Hello @ArntRune 

It sounds like you're running into an issue with setting the width of an iframe in HubSpot CMS. One solution you can try is to set the width of the iframe using CSS instead of using the "width" attribute in the iframe code. Here are the steps to do this. Add the iframe code to the source code of your module. In the same module, click on the "Edit Options" button and select "Edit CSS". In the CSS editor, add the following code to set the width of the iframe to 100%:

 

iframe {
  width: 100%;
}

Now save your changes and preview your module.

This should set the width of the iframe to 100% and prevent it from getting converted into a fixed width. If this doesn't work, you can try using a different module or widget that supports iframes or embedding external web pages.

Thanks & Regards 
Himanshu Rauthan



Digital Marketing & Inbound Expert In Growth Hacking Technology