• In Chat
  • About
  • Contact
  • Browse

    Latest Coding

    Latest Daily

    Latest Health

    Featured Story

Coding 2018

| Begin | File Bank |  Register | Reply | Search | Statistics | Manual |
Site Coding Coding / Site Coding /  
 

Videos made to be responsive

 
Author Admin
Admin


#1 | Posted: 16 Oct 2018 08:15 | Edited by: Admin 
Bit annoying when the videos are too large to fit a tablet screen. With the alterations below they have been made to be responsive - they will become smaller on tablets and phones.

This code was added to a universal styling css file ...

.ytc {
position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%;
}

.ytc iframe, .embed-container object, .embed-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

And all references to width and height removed from the bb_codes file with regard to ytc div wrapped iframe videos

With the above alterations the iframe resizes to the size of the ytc div, which is itself responsive.
Website Designer

Your Reply Click this icon to move up to the quoted message


 ?
Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.

 

 
Coding Powered by Forum Software miniBB ®
Online now: Guests - 1
Members - 0
Max. ever online: 33 [10 May 2019 12:44]
Guests - 33 / Members - 0
No Of Posts

  • Latest Daily Post ...

  • Latest Health Post ...

CONTACT

Phone: +01 0775 8107 427

sport4u2018@gmail.com

WEBMASTER

email icon Mark Jones

Latest Story

RANDOM CODING

  • Copyright © 2018 MKJ Brainwaving
↑ TOP