Hello, williambelle.
Could you provide a link to your website and the page in question? Thanks!
williambelle, the <div> with the class of ‘fluid-width-video-wrapper’ has a style of padding-top: 56.25% applied to it. Set that to 0 (or a similarly low number) to avoid this gap. This can be done by FTPing into your site and editing the style.css or by going to your WP admin area and selecting appearance > Editor.
Let me know if that helps!
I can’t find the 56.25 % in the editor
Try just placing this at the bottom of your style.css:
.fluid-width-video-wrapper {
padding-top: 2%;
}
Let me know if that works for your (don’t forget to press ‘update’).
Ok I see why—that style is either added to the PHP itself or is injected with JavaScript so it’s padding setting is loading after yours and is overriding it. Not something I like doing all the time, but try adding !important to the code to make sure it gets applied:
.fluid-width-video-wrapper {
padding-top: 2% !important;
}
Let me know if that works for you.
It works but the youtube video isn’t visible anymore
Ok, I see the problem now—you’ll want to remove the code I gave you. See this image?This shows that there is an empty <fluid-width-video-wrapper> in your post somewhere below the post image. That’s what’s causing the gap and without the padding the real video which uses the same tag can’t display.
Go to your post editor and click the ‘text’ tab and find the empty div I spoke of—remove that and your problem should be fixed.
But i have this problem on every post
Hmm, I’m not sure why there would be empty tags like that before every post unless it’s just a poorly coded php template page. This sounds like it could become a very involved project and you may want to look into hiring a Developer to fix the template for you.
Is there no other way to solve this problem?
Thanks,