WordPress.org

Support

Support » How-To and Troubleshooting » Embedded Youtube Video Overlap

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)
  • Arealpolitik

    @arealpolitik

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

    esmi

    @esmi

    Forum Moderator

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

    Arealpolitik

    @arealpolitik

    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.

    Arealpolitik

    @arealpolitik

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

    What do you suggest?

    Arealpolitik

    @arealpolitik

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

    esmi

    @esmi

    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.

    Arealpolitik

    @arealpolitik

    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

    Arealpolitik

    @arealpolitik

    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.