WordPress.org

Ready to get started?Download WordPress

Forums

How to put the video in the center of the post? (9 posts)

  1. elsatrento
    Member
    Posted 4 years ago #

    It may be silly, but I need to put the video on the center of the post, and not on the left border. Is it possible?

  2. elsatrento
    Member
    Posted 4 years ago #

    And how to avoid the thumbnails of other videos at the end of the video?

  3. esmi
    Forum Moderator
    Posted 4 years ago #

    Is it possible?

    Yes - it should be but there's nothing anyone can really do to help since you haven't provided a link to a relevant page on your site.

  4. elsatrento
    Member
    Posted 4 years ago #

    I'm sorry, my bad. Here's the link: http://elsatrento.org
    By the way, I resolved for the thumbnails: I used the embed code of youtube instead of smart youtube since the plugin doesn't have the option to exclude related videos.

  5. WordPress Chef
    Member
    Posted 4 years ago #

    You can wrap YouTube video within DIV and can style it to align center. For e.g.

    <div style="text-align:center">Paste YouTube Code Here/</div>

    It will show display video in the center.

    ---
    [moderated] Link removed as per the Forum Rules.

  6. elsatrento
    Member
    Posted 4 years ago #

    It worked great, Chef! Thanks a lot! And I can do this with everything I want?
    I'll follow up your blog, it looks great!

  7. WordPress Chef
    Member
    Posted 4 years ago #

    Yeah this CSS trick works with everything images, text etc...

  8. elsatrento
    Member
    Posted 4 years ago #

    Thanks again Chef :)

  9. still giving
    Member
    Posted 4 years ago #

    I find that

    <div style="text-align:center">
    http://www.youtube.com/watch?v=xxx
    </div>

    does not work to center video.

    I have tried other css hacks like using % or auto option.

    Where is the core css to fix this so that center is the default instead of left?

    I cannot get my head around how the people that decided on css standards did NOT make an option for center ... its incredible.

    I mean ... why? What planet are they on?

    Thanks in advance if you managed to fix it and let us know.

Topic Closed

This topic has been closed to new replies.

About this Topic