Okay
  Public Ticket #203935
youtube video embed size
Closed

Comments

  • Cam started the conversation

    Hi There! 

    Am having trouble changing the size of youtube embeds, both in iframe and html. 

    I assume its the theme overriding the embed parameters. 

    The video displays in full screen width in both Chrome and Safari but I'd really like it to be smaller, as per the custom size entered in the video parameters.

    Any ideas?  

    THanks! 

  •  8,470
    Tahir replied

    Hey Cam!

    Add this to the Visual Composer Css button so the css shows on that page only:

    .iframe-embed iframe, iframe {
        width: initial;
    }
    

    Or 

    .iframe-embed iframe, iframe {
        width: 500px;
        height: 350px; 
    
    }


    ThemeNectar Support Team 

  • Cam replied

    Hey there, 

    thanks for the response.  I tried both of those, with no change.  I also tried to set the css dimensions to exactly match the embed dimensions (560x315) and that didn't work either... 

    Thanks!  

  •  8,470
    Tahir replied

    Hey Cam!

    My bad, Just tested this and will work :

    .iframe-embed iframe, iframe {
        width: 500px !important;
        height: 350px !important; 
    
    }

    Cheers


    ThemeNectar Support Team 

  • Cam replied

    Thanks, yep that definitely worked!  

    I see it's also limited the facebook comments section down the bottom to the same dimensions.  Is there any way to have it apply to the youtube vid only? 

    Thanks heaps for all your help!! 

  •  8,470
    Tahir replied

    Hey Cam!

    Try like this :

    .iframe-embed iframe {
        width: 500px !important;
        height: 350px !important; 
    
    }

    Cheers


    ThemeNectar Support Team 

  • Cam replied

    Great, thanks!!