Resize and realign youtube video

  • Unknown's avatar

    On the homepage of , I’d like to resize a youtube video smaller and align that video right (rather than the automatic center placement). Then I’d like to write text to the left of the video (text wrap?).

    I’ve tried myself, but can’t seem to get anywhere with resizing or realigning the video.

    I’d really appreciate any help that you can offer. Thank you!

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Text wrap on an embedded video isn’t really possible due to the structure of the embed code. We can float all iframe elements to the right with the following

    iframe {
        float: right;
    }

    but text will not wrap around them.
    If you wanted to only float some youtubes to the right, we can use the unique page or post ID. I only saw one Youtube, on your News page, so if that was the one you wanted to align to the right, or wanted all Youtubes in posts to be right aligned, we could do this
    .post.hentry iframe {
    float: right;
    }`

    You can use the youtube shortcode and the height and width attributes to set the size of a Youtube as explained in our Youtube Support Page under Video Customizations.

  • Unknown's avatar

    Thanks so much for your reply. I’ll give it a try.

    I did try unsuccessfully to resize the video yesterday per the link you shared, but I’ll give it another go.

    Thank you!

  • Unknown's avatar

    You are welcome, and if you have troubles, let me know.

  • The topic ‘Resize and realign youtube video’ is closed to new replies.