Adding Image Behind Embedded YouTube Video?
-
Hi, I’m trying to make an embedded YouTube video appear as though it’s playing on vintage TV. I achieved mild success by adding the following code to the HTML on that page and my CSS stylesheet, but the video doesn’t fit properly within the TV screen image and I’m not sure how to adjust it?
Another major problem I’m encountering is my site is mobile-responsive, and when I change my window size the video changes sizes (so sometimes the video is wider than the image – say when viewed on a full screen PC, and sometimes it’s smaller – when viewed on my iPhone).
My attempt may be viewed here (scroll down to the bottom).
Here is what I have tried in the HTML of my page:
<div class="youtube"> </div>
Here is what I have tried in my CSS:
div.youtube { background: url('https://prayersandapples.com/wp-content/uploads/2015/02/TV-Vintage-Background.png'); padding: 75px; background-repeat: no-repeat; }
The image size is 800 x 503 (however, as you’ll notice, the ‘screen’ part that I would like the image to play in is a bit smaller and aligned more to the left within the image.
(If I could get the TV centered in the page, that would be an added bonus!)
If anyone has any advice, I’d greatly appreciate it. I’m not very savy at all this, so if you wouldn’t mind please include as many details as possible ?? Thank you in advance so much!
(My website is: PrayersAndApples.com.)
- The topic ‘Adding Image Behind Embedded YouTube Video?’ is closed to new replies.