iFrame Formatting Help

iframe

(Matt) #1

This is a separate issue from an earlier post about my video not playing within an iframe.

It is indirectly related to my Hype content but I thought I would ask for help here as I’m really struggling with this and my research hasn’t helped.

I’m having an issue where I enter an iFrame attribute on a content page for scrolling=“no” for example:

<div><iframe style="width: 1px; min-width: 100%; height: 100%;" src="https://www.yciw.net/_1d/" width="100%" height="100%" scrolling="no"></iframe></div>

Couple of things:

  1. I have the weird styling so that the iframe is responsive in iOS. It seems to work well for my Hype content.

  2. After saving the page the iframe is responsive as expected and displays correctly. However, when I view the code again the scrolling=“no” has been stripped out.

  3. If I simply save the page again without adding back in scrolling=“no” the iframe is no longer responsive and does not display correctly.

Is there some way I can include scrolling=“no” so it does not get stripped out? I have other users who will be updating the page and they will not be able to add back in the scrolling=“no”.

Thank you!
Matt


#2

Some content management systems do this – unfortunately there isn’t a way around this unless you enforce that property from outside. To set that property, you’ll need to target the iframe and add the scrolling=“no” attribute. Here’s a post that shows how to do that: http://stackoverflow.com/q/6653665


(Matt) #3

Daniel, thank you so much!!! I did it and it worked :smile:


(Matt) #4

On a related note:
Is there any Javascript that I could add that would style the iframe differently if it is loading on iOS as apposed to a laptop/desktop?