Support » Fixing WordPress » Embedded Youtube Video Overlap

  • 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.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Make life simpler, just use the <center></center> bracket…



    Forum Moderator

    No – that’s old markup and shouldn’t be used anymore.

    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.

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

    What do you suggest?

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



    Forum Moderator

    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.

    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

    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.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Embedded Youtube Video Overlap’ is closed to new replies.