• Hallo,

    Everything is fine with the DCO Comments attachment plugin except the embeded youtube videos (postet via link) are to wide. What can i do to display them on every device with a with of 100% so that it fits on screen ?
    Perhaps someone can help please. I dont find the setting for this.

    regards Chris

Viewing 1 replies (of 1 total)
  • Plugin Author Denis Yanchevskiy

    (@denisco)

    Hello @cshijacked,
    I’m sorry to be late with the reply.

    I dont find the setting for this.

    There is no such setting. Content display is usually theme territory.

    You can try this snippet:

    PHP

    function wporg_oembed_result( $html ) {
    	return $html !== '' ? '<div class="iframe-container">' . $html . '</div>' : '';
    }
    
    add_filter( 'oembed_result', 'wporg_oembed_result' );

    CSS

    .iframe-container {
      overflow: hidden;
      padding-top: 56.25%;
      position: relative;
    }
    .iframe-container iframe {
      border: 0;
      height: 100%;
      left: 0;
      position: absolute;
      top: 0;
      width: 100%;
    }

    Or one of the others.

Viewing 1 replies (of 1 total)
  • The topic ‘Youtube Videos with’ is closed to new replies.