ocastaned Posted November 6, 2020 Share Posted November 6, 2020 Can somebody tell me how to make YouTube videos responsive in WHMCS? Look at this: 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted November 6, 2020 Share Posted November 6, 2020 12 hours ago, ocastaned said: Can somebody tell me how to make YouTube videos responsive in WHMCS? the quickest way would be to make the width of the iframe 100%... to do that in WHMCS, you would use the "Source Code" option when editing the kb article... 0 Quote Link to comment Share on other sites More sharing options...
ocastaned Posted November 6, 2020 Author Share Posted November 6, 2020 1 hour ago, brian! said: the quickest way would be to make the width of the iframe 100%... to do that in WHMCS, you would use the "Source Code" option when editing the kb article... Thank you. It worked fine for mobile, but if I visit that article in my desktop computer it looks weird: 0 Quote Link to comment Share on other sites More sharing options...
AALayer Posted November 6, 2020 Share Posted November 6, 2020 You can do normal HTML to adjust it per 100% width[responsive]. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted November 7, 2020 Share Posted November 7, 2020 22 hours ago, ocastaned said: Thank you. It worked fine for mobile, but if I visit that article in my desktop computer it looks weird: then you might have to wrap it in a div... <div class="video-container"><iframe src="https://www.youtube.com/embed/Qo002HIvAd0" width="560" height="315" frameborder="0" allowfullscreen="allowfullscreen"></iframe></div> and then add some CSS code to your template's custom.css file... .video-container {position:relative; padding-bottom:56.25%; padding-top:30px; height:0; overflow:hidden;} .video-container iframe, .video-container object, .video-container embed {position:absolute; top:0; left:0; width:100%; height:100%;} 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.