Some scripts/iframes not responsive

Posted in: Newsmag
Post count: 217

Hi,

it’s not the first time I noticed this.

Some external scripts and iframes (videos) are not responsive, although they should according to my content partners. They can’t really explain this.

Do you have a solution for this? On this site you can find an example: http://dev.promicabana.de/test-article/

I deactivated most of the plugins, but it’s still not responsive.

It has to look like this: http://www.videovalis.tv/teasers/271

Thank you!

Post count: 9544

I’ve run into this with o-embed in post for SoundCloud, actually.

I seem to recall fixing this on our other site with CSS,

iframe{max-width:100%}

Post count: 6600

Hi,

Try the css from below then test again.

.td-post-content iframe {
width: 100% !important;
}

If this isn’t working well let me know and also provide the embed code you’ve used to add the video player on post as the it seems the videovalis player isn’t supported to work in wordpress by just pasting the video link: https://codex.wordpress.org/Embeds

Thanks

Post count: 217

Thanky,

your solution seems to work.

Is there some code for scripts too? I changed the width in the script itself to 100%. Now it’s indeed responsive, but it overlays the sidebar.

<script type="text/javascript">
var snackTV_config = {
displayad:0,
fracautoplay:0,
monetizer:0,
pmode:0,
userwidth:'100%',
autoplay:'false',
playlist:'false',
hideitems:'bottom',
type:7,
publisher:'promicabana',
color:'000000',
bgcolor:'ffffff',
font:'arial',
layout:'light',
videos:'1497195',
revplay:false,
showadctrl:false,
isRTL:false
}
</script>
<script type="text/javascript" src="http://www.snacktv.de/snacktag/snacktag.js" charset="iso-8859-1"></script>
  • This reply was modified 11 years by Bichareh.
Post count: 6600

Hi,

When setting the width to 100% you need to consider that the element will occupy all the space within the containing element.
I suggest you get a freelancer to help you with this if you don’t have any html/css coding experience.

Thanks

  • This reply was modified 11 years by Lucian.
Post count: 9544

@Bichareh
you can also try adding the max-width CSS variable, and also try something like 95% vs 100%.
On one of our sites (not using TagDiv themes), we actually set some things to 85% to control how things fit within various containers.

Viewing 6 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic.