Thread Locked This thread is locked - replies are not allowed.


This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 7 - Pages: 1 - Last Post: 10 Mar 24, 12:09 Last Post By: Laza
gerbil

Posts: 17
Registered: 20-Apr-2005
Embedded YouTube videos not centred
Posted: 8 Mar 24, 19:58
 
I've several YouTube videos which are embedded using the External link option with the standard YouTube embed command
<iframe width="560" height="315" src="https://www.youtube.com/embed/THE_VIDEO_ID" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>

Both the image and the YouTube are offset and have a white margin at the top and on the left-hand side. I cannot find a setting to centre the YouTube video in the Tiger settings.

If I build the album using the Story skin the image and video are correctly centred in the box.
JeffTucker

Posts: 8,058
Registered: 31-Jan-2006
Re: Embedded YouTube videos not centred
Posted: 8 Mar 24, 20:45   in response to: gerbil in response to: gerbil
 
Try just entering the target URL, rather than the full "embed" code, like:

https://www.youtube.com/embed/THE_VIDEO_ID
Laza

Posts: 1,419
Registered: 6-Sep-2005
Re: Embedded YouTube videos not centred
Posted: 9 Mar 24, 06:46   in response to: gerbil in response to: gerbil
 
You might want to change the background image to repeat instead of blown up: Settings / Tiger / Site / Position = Repeat both
gerbil

Posts: 17
Registered: 20-Apr-2005
Re: Embedded YouTube videos not centred
Posted: 9 Mar 24, 11:38   in response to: JeffTucker in response to: JeffTucker
 
Thank you. That worked.
But it doesn't explain why there wasn't a problem in the other skin?
gerbil

Posts: 17
Registered: 20-Apr-2005
Re: Embedded YouTube videos not centred
Posted: 9 Mar 24, 11:47   in response to: Laza in response to: Laza
 
That did not make any difference. I'm just using the bg.png background image.

I've now seen, when I Inspect div.lightbox-main.external.iframe there is a 10px padding but YouTube overlaps the RH and bottom of the white frame.

And I've now found I can edit the padding from 10px to 0px and the YouTube is centred

.lightbox .lightbox-main {
position: absolute;
z-index: 1;
padding: 0px;

Edited by: gerbil on 9 Mar 2024, 11:47

Edited by: gerbil on 9 Mar 2024, 11:50
Laza

Posts: 1,419
Registered: 6-Sep-2005
Re: Embedded YouTube videos not centred
Posted: 9 Mar 24, 12:54   in response to: gerbil in response to: gerbil
 
It's not related to the IFrame issue, but magnifying the bg.png this much hurts my eye. This pattern was made to be repeated.
gerbil

Posts: 17
Registered: 20-Apr-2005
Re: Embedded YouTube videos not centred
Posted: 9 Mar 24, 16:22   in response to: Laza in response to: Laza
 
I must have used that setting since I switched from Turtle to Tiger in 2019/20? It must have been a default as I doubt I altered any of those site settings?
I always assumed it was meant to emulate a coarse woven linen for the Linen style?
Laza

Posts: 1,419
Registered: 6-Sep-2005
Re: Embedded YouTube videos not centred
Posted: 10 Mar 24, 12:09   in response to: gerbil in response to: gerbil
 
The normal sizing of the Linen background pattern should be much finer, like this: https://laza.jalbum.net/Tiger%205%20styles/Linen/Nature/index.html

It might happen that during the Turtle -> Tiger transition the background image size and tiling were not imported properly for some reason.
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums