Archived topic
How to get rid off the white space above and below video
7 replies · Started by Karsten on April 10, 2022
Hey friends,
please check out my landingpage.
There is too much white space above and below the video, especially on mobile view also. Please check and help to fix this issue. I guess it could also be a bug.
Thank you
Karsten
Hi there,
does the issue persist if you disable Autoptimize ?
If it does try adding this CSS:
.wp-block-embed iframe {
height: auto;
}
I have disabled Autoptimize, but the issue still persists.
If you remove the Video Block, publish those changes and exit the editor.
Then re-edit the page and add the Video back in to the site.
I wonder if the recent WP updates messed with the core blocks embed CSS....
yes, unfortunately the issue persists.
I have now added this CSS and the white space disappered:
.wp-block-embed iframe {
height: auto;
}
But now the video is very small on desktop and tablet view.
Please check and advise.
Thank you
What if we make it mobile only?
@media (max-width: 768px) {
.wp-block-embed iframe {
height: auto;
}
}
yes, helpful. Thank you, Leo
Will this issue be fixed in one of the next updates?
That looks like a CSS issue from WP core but we will take a closer look.