How to put a video responsive from Youtube on the homepage

Home Forums Fitness Pro Forum How to put a video responsive from Youtube on the homepage

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #17385
    PuigPuig
    Participant
    • Topics: 4
    • Replies: 2
    • Total: 6
    Member since: December 24, 2015

    Hi,

    I would like to embed a video from youtube, full size on thee laptob but responsive on other platforms like mobile and tablets.

    I don’t know how I can do it.

    Thanks a lot.

    #17386
    Sonl SinhaSonl Sinha
    Moderator
    • Topics: 0
    • Replies: 31028
    • Total: 31028
    Member since: August 16, 2013

    Hi,

    Kindly show us your website link

    Regards,
    Shri

    #17387
    PuigPuig
    Participant
    • Topics: 4
    • Replies: 2
    • Total: 6
    Member since: December 24, 2015

    Hi,

    Here’s the website: http://www.y2cgymbox.com/en

    Thanks!

    #17389
    Sonl SinhaSonl Sinha
    Moderator
    • Topics: 0
    • Replies: 31028
    • Total: 31028
    Member since: August 16, 2013

    Hi,

    Kindly go to Appearance>Theme Options>Basic Settings>Custom CSS box:
    paste this css code in custom css box

    .video-container iframe{width:100%; height:600px;}

    Regards,
    Shri

    #17390
    PuigPuig
    Participant
    • Topics: 4
    • Replies: 2
    • Total: 6
    Member since: December 24, 2015

    Perfect!

    Thanks a lot for you quickly answer.

    #17391
    Sonl SinhaSonl Sinha
    Moderator
    • Topics: 0
    • Replies: 31028
    • Total: 31028
    Member since: August 16, 2013

    paste this css code in custom css box (for Responsive)

    @media screen and (max-width:479px) {
    	.video-container iframe{width:100%; height:auto;}
    	}
    
    @media screen and (max-width:719px) and (min-width:480px) {
    	.video-container iframe{width:100%; height:300px;}
    	}
    	
    @media screen and (max-width:979px) and (min-width:720px) {
    	.video-container iframe{width:100%; height:500px;}
    	}

    Regards,
    Shri

    #20610
    Emma BABIN-PIGOTEmma BABIN-PIGOT
    Participant
    • Topics: 10
    • Replies: 9
    • Total: 19
    Member since: January 21, 2016

    Hello, I have followed your advice writing : video-container iframe{width:100%; height:600px;} in the css box (stetting basics)
    but my video is still no responsive : http://ervent.aragon-team.fr/a-propos-d-ervent/

    the embed from youtube is : <iframe width=”560″ height=”315″ src=”https://www.youtube.com/embed/LKhldlWe2xI” frameborder=”0″ allowfullscreen></iframe>

    Thanks for your help.

    #20641
    Sonl SinhaSonl Sinha
    Moderator
    • Topics: 0
    • Replies: 31028
    • Total: 31028
    Member since: August 16, 2013

    Hi Emma,

    The website link you provided above is invalid. Please provide the valid link.

    Regards,
    Shri

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.