Jump to content

Center YouTube Embeds


ErnieG014

Recommended Posts

Hello,

I'm not sure if this is even a feature yet (or if I'm just not doing something right). So I'm posting this in the product feedback/ideas section. When pasting a YouTube link on a post, it will automatically embed and show a preview of the video on the post while editing. However, once this is done, you can't do any formatting to the YouTube video. If you highlight it and press center it will not center. Even if you are already typing in center and embed a video, it will align to the left side of the post.

Is there anyway to change this or add formatting options for embedded videos? Currently, you can't center YouTube videos without turning on HTML and adding center tags around YouTube's embedded <div> tags.

If I've posted this in the wrong section, let me know! Thanks!

Link to comment
Share on other sites

  • 2 months later...
  • 11 months later...
On ‎17‎/‎10‎/‎2017 at 11:27 AM, greek_parea said:

i have this problem & me

Sorry not sure I follow

Just posted video in my forum and centered for me (size even changed when changing screen size)

Perhaps link to your forum with posted youtube video so can see why happens on your forum

Link to comment
Share on other sites

I have the below code in my custom.css to center and resize embed video:

div.ipsEmbeddedVideo {
    margin:0px auto;
}

.ipsEmbeddedVideo.ipsEmbeddedVideo_limited > div,
.ipsEmbeddedVideo:not(.ipsEmbeddedVideo_limited){
  max-width: 700px;
  padding-bottom: 0;
}

.ipsEmbeddedVideo.ipsEmbeddedVideo_limited > div:after,
.ipsEmbeddedVideo:not(.ipsEmbeddedVideo_limited):after{
  content: '';
  display: block;
  padding-bottom: 56.25%;
}

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Upcoming Events

    No upcoming events found
×
×
  • Create New...