Hi guys,
I have a page with 2 embedded youtube videos: https://apex86.net/pages/resources
I had to use a “custom liquid” page to achieve dynamic resizing of the videos, using the following code:
<iframe src="https://www.youtube.com/embed/2hHNo9RyPTU" frameborder="0" allowfullscreen=""></iframe>
<iframe src="https://www.youtube.com/embed/vvk5EfhG18E" frameborder="0" allowfullscreen=""></iframe>
My only issue is that there is a huge amount of padding between the videos, which seems to be coming from the bottom of the first container. It seems like simply adjusting the padding-bottom would easily fix this. But, it is clipping the video bottom at the same time as it reduces actual padding.
Any help would be much appreciated!
Are these community forums really meant to advertise paid services?
Yes, I was definitely hoping to find some help here, in either a link to a resource where I can help myself, or in a code suggestion.
Hi Apex,
Use following solutions :
- Replace padding-bottom ratio hack with aspect-ratio.
- Reduce or remove margins or gaps causing excessive space.
- Avoid absolute positioning of videos unless needed.
- Ensure containers don’t clip content with overflow:visible
Please apply these solutions and let me know if you need more detailed solutions.
1 Like
Thank you Steven,
I have been clunking around like a caveman, using your suggestions to guide me. Here is what I have come up with:
<iframe src="https://www.youtube.com/embed/2hHNo9RyPTU" frameborder="0" allowfullscreen=""></iframe>
<iframe src="https://www.youtube.com/embed/vvk5EfhG18E" frameborder="0" allowfullscreen=""></iframe>
This has resolved the crazy amount of padding, but everything is still justified left. I have tried align-items and align-content, but neither are doing the trick. I must be missing something!
:EDIT:
Just needed a