WordPress.org

Forums

Embedded Youtube Video Overlap (9 posts)

  1. fredcooper
    Member
    Posted 4 years ago #

    Hi there,
    I'm trying to embed youtube videos without using a plugin, but making them center-aligned using:

    <div style="text-align: center;">embed code:</div>

    I keep having this problem where the video is aligned centrally, but there is an overlap between the bottom of the video and the line showing the posting date, category, edit, etc. The top is fine, but I can't seem to figure out how to space this out properly. Sorry, I'm pretty new to this.

  2. Arealpolitik
    Member
    Posted 3 years ago #

    Make life simpler, just use the <center></center> bracket...

  3. esmi
    Forum Moderator
    Posted 3 years ago #

    No - that's old markup and shouldn't be used anymore.

  4. Arealpolitik
    Member
    Posted 3 years ago #

    Works better on all my sites. Have no problem with it... If you use the <div style="text-align: center;"> and go back to html, it changes it back to left align.

  5. Arealpolitik
    Member
    Posted 3 years ago #

    Just on YouTube videos... either old embed code or iframe.

    What do you suggest?

  6. Arealpolitik
    Member
    Posted 3 years ago #

    I also use this for vertical alignment <div><center></center></div> and works great. Your suggestion is probably better since I am old-school. :)

  7. esmi
    Forum Moderator
    Posted 3 years ago #

    and go back to html, it changes it back to left align.

    That's because you are switching editing tabs - not because of the markup/CSS you are adding. Once you use the HTML tab for a post, you have to stick to it or your markup will get removed.

    The better way to do this is via the theme's stylesheet.

  8. Arealpolitik
    Member
    Posted 3 years ago #

    I concur... but, if you do it my way, changing tabs does not affect it. Also, when I use the text align center on a YouTube video and post, it reverts back to left align also. Probably only when you use YouTube 'old embed code' not on 'iframe'. Since the newest version of WordPress

    I am sure you are right, as I said I am old-school and you can't teach an old dog new tricks, well maybe, but it takes time. It works for me...

    Thanks esmi

  9. Arealpolitik
    Member
    Posted 3 years ago #

    As I was saying before I forgot, told you I was old, lol. Since the newest version of WordPress came out it does not seem to be as much of a problem.

Topic Closed

This topic has been closed to new replies.

About this Topic