Web Hosting
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Reply To: How to change all video player dimensions?

Discussion in 'Misc WordPress Requests' started by danielfonda, Nov 29, 2017.

  1. danielfonda

    Guest

    Reply To: How to change all video player dimensions?, by danielfonda

    You’d have to give me an example, but usually you’d find the wrapping elements and set a width to said element via css.

    Alternatively you could do that on the video elements itself. Now the question is, whether you’re embedding a youtube video, or if you’re self-hosting the video.

    Youtube uses iframe to output the video, so in css that would be:


    iframe {max-width:100%; width:200px; height:auto;}


    For self-hosted videos the equivalent would be:


    video {max-width:100%; width:200px; height:auto;}


    That being said, I’d definitely recommend assigning a class (or wrapping the youtube video inside of a div), so to not impact all videos (or all iframes) on your site.

    Hope that does it

    Reply To: How to change all video player dimensions?
     
    #1

Share This Page

Web Hosting