How to add frames to youtube videos?

  • Author
  • #465589


    I have an image of a customized frame on my computer and I want it to be the frame of a youtube video on my wordpress blog. How do I do this? The frame has been created keeping in mind the dimensions of the video and I have also created the frame in such a way that the center of the frame and the center of the video will be the same. Please help me with this.
    Thank you.

    The blog I need help with is


    Interesting question… Please upload the image and paste its URL here, also give me the dimensions of the video.





    Paste this into the html post editor:

    <p style="background-image:url('');width:778px;height:402px;padding-top:16px;">

    One reservation: it’s ok in Firefox, Safari, Opera and Flock, but I can’t check it in the wretched IE at the moment. Can you?



    i can get the frame but at the same time when i am trying to fit the video in it, the image is repeating itself which i don’t want. Also i want the frame image at the centre because the video by default appears at the centre. What do i do?


    To ensure there’s no repeat, you can add this to the code:


    But the numbers I put were tailored to the objects you gave me. Since I specified a fixed width, there should be no repeat unless you’re trying to change things. What exactly are you trying to do? The video you’ve got on your post now is 425×350, not 640×385.

    In my opinion a centered video doesn’t look good in Rubric. Anyway, if you want the whole thing centered, use this:

    <div class="aligncenter" style=



    @pan, you are a hero. “it’s ok in Firefox, Safari, Opera and Flock, but I can’t check it in the wretched IE at the moment.”
    I’m not sure what’s more heroic: checking in 4 different browsers; or being willing to check it in IE :)



    I tried to do as you directed but i can only stop the repeatation and cant control the alignment. so according to your reply, i am sending you another URL of the image according to the video size you mentioned above (425×350). can u please send me the entire code as i am not at all good at codes. Also i want to make sure that in future whenever i attach a video i would be able to use the same frame.what should i do?



    as you can see in the blog the size is fitting but there is no alignment. please help


    @andrew: Thanks, but there’s nothing heroic in opening 4 browsers! I’m using Safari and Firefox anyway, and I just click the buttons on my dock for the other two (I’ve set my tests blog as their start page).

    As for IE, you’re right I guess, but you know that more than 50% of internet users use it (for no better reason than that it happens to be the browser planted in their PCs), so you can’t ignore the damn thing. There’s no telling how many tricks and workarounds I’ve trashed because the creature wouldn’t understand…



    <div class="aligncenter" style="background-image:url('');width:500px;height:356px;padding-top:6px;padding-left:1px;">

    (But as I said, I don’t agree with centering in Rubric.)

    To use this with other 425×350 videos, you just change the video shortcode. For different dimensions and images, note that the width I’m specifying is the width of the image, and the height is the height of the image minus the top padding.


    Moderator Emeritus

    re: centering in rubric
    curious why?


    Curious why arzan wants it or why I don’t like it?


    Moderator Emeritus




    Thank you for solving my problem


    @arzan86: You’re welcome.

    @tess: Because it’s a flexible-width theme. As you know, resizing the browser window horizontally will make the video slide about, and I find that quite unnatural.


    Hi arzan86 here.

    M trying to place that same video with the same code that you gave but due to some reason the frame and the video are going out of the area. why is this happening and how do i solve this problem?

    Also i want to know that if different themes have different measurements than how can i get the accurate measurement of my blog area and also when i place a video, what should i keep in mind?



    how can i control the size of a youtube video inorder to fix it in the same frame?



    @compactdestinationexperts: Please paste the URL of your blog when asking questions here, or link your username to your blog (as explained in the Sticky 8 Things to Know Before Posting). We can’t help without that.

    @arzan86: You modify the shortcode this way (replacing WWW and HHH with numbers, of course):
    [youtube=URL HERE&w=WWW&h=HHH]
    Or just
    [youtube=URL HERE&w=WWW]
    (Specifying width only will change the height too in proportion.)

    @myninjaway: You posted, and got replies, here:
    Don’t hijack irrelevant threads.

The topic ‘How to add frames to youtube videos?’ is closed to new replies.