-
GZeitung
Hello,
we need some help! We use embedded YouTube Videos which we just copy and paste inside.
Sad but true, they do not look good. Well, actually not good at all 🙂
Please take a look here: https://gutschein-zeitung.de/hansa-park-gutschein-2-fuer-1-coupon-ticket
Maybe you have a tiny cute css for us to make them look beautiful?
Thank you!
-
Hi there,
Embedded videos are iframes, you ususally can not add external CSS to affect iframes’ styles.
Do you have an example video that you are happy with?
-
GZeitung
Hi!
This code of you works: https://docs.generatepress.com/article/responsive-videos/
We just need some more empty space below the video. Please check here:
https://gutschein-zeitung.de/aachener-tierpark-euregiozoo-gutschein-2-fuer-1-coupon-ticket
Thank you!
-
David
Hi there,
it really should not be necessary to use that old method.
But if it works then you should have the
videoWrapper
class to style eg. to add some space below it add this CSS:.videoWrapper { margin-bottom: 2em; }
-
GZeitung
Hi David,
thanks for assisting.
We just noticed something interesting.
On blog posts videos are shown correctly.
Please check here: https://gutschein-zeitung.de/universal-studios-japan-achterbahn-donkey-kong-kommt-spaeter
On pages not: https://gutschein-zeitung.de/europa-park-gutschein-2-fuer-1-coupon-ticket
Any idea why is that?
-
David
Actually neither of them are being shown correctly.
If you resize the browser you will see the height does not change.If you’re using the classic editor, then use this website to create a responsive embed code:
-
GZeitung
So this happens only when using classic editor?
If so, what to do with the videos already existing (about 3.000 in our case)?
-
David
When did the issue first occur ? i assume the other 3000 videos were displaying correctly before.
As an alternative you can try this CSS:
.entry-content iframe { height: auto; aspect-ratio: 16/9; }
It will make all iframes in the content a responsive 16/9 aspect ratuo
-
GZeitung
Works perfectly!
Big thanks!
-
David
You’re welcome
- You must be logged in to reply to this topic.