How to make a YouTube embed video responsive using CSS

Posted by admin on Sat, 02/10/2018 - 08:33

Quick snippet how to make a youtube embed video responsive by CSS only.

The easiest way, using viewport units (IE9+)

iframe {
    width: 100vw; 
    height: 56.25vw; /* 100/56.25 = 560/315 = 1.778 */

CSS2 style fix using a CSS trick and wrapper with class .aspect-ratio:

    .aspect-ratio {
      position: relative;
      width: 100%;
      height: 0;
      padding-bottom: 56%; /* The height of the item will now be 56% of the width. */
    /* Adjust the iframe so it's rendered in the outer-width and outer-height of it's parent */
    .aspect-ratio iframe {
      position: absolute;
      width: 100%;
      height: 100%;
      left: 0;
      top: 0;

Check here:


Hey! Don't miss a new cool stuff!


컴온 come on (not verified) (not verified)

viagra canada Rwcbtp rouffi (not verified)

best online pharmacy canadian pharmacy review Ovuovr bnenpc (not verified)

buy cialis pills Wmkbna cgvgoo (not verified)

liquid tadalafil Ckrfuj cxlpwa (not verified)

viagra without a doctor prescription viagra sildenafil Xumfzs mjlldn (not verified)

viagra without a doctor prescription viagra sildenafil Xumfzs mjlldn

Chincz (not verified)

discount viagra free viagra sildenafil price

Wxfxjb (not verified)

walmart pharmacy Mwyzru gnwvhj

Cevdin (not verified)

cialis buy cialis online 20 cialis Xwohcc znfdqq

Lyjrhj (not verified) - vardenafil levitra vardenafil

Viagra (not verified)

Acheter Viagra En Europe

buy cialis onli... (not verified)

Cialis Diarrea

brand cialis online (not verified)

acheter levitra gratuits

Propecia (not verified)

Propecia Pa Natet

stromectol with... (not verified)

Tadacip 20 Mg

Stromectol (not verified)

Cos'E Levitra

Viagra (not verified)

compare ed medicines cialis and levitra

MichaelMot (not verified)

gay dads dating
disabled gay dating
jacked gay dating site

Cialis (not verified)

Acheter Levitra En Ligne

buy generic pro... (not verified)

Viagra Online Canada Overnight

Cialis (not verified)

comprar cialis original foro

Stromectol (not verified)

Health Pills Ship Overnight

Cialis (not verified)

Cephalexin Imha

Stromectol (not verified)

Abuso De Kamagra

Propecia (not verified)

cialis super active generique 20 mg

buy stromectol ... (not verified)

where to buy generic cialis

where can i buy... (not verified)

Acheter Levitra Online

Plaquenil (not verified)

Find Doxycycline Legally Tablet

hcq over the counter (not verified)

Where Can I Buy Thyroxine In N.Z

hydroxychloroqu... (not verified)

Vente Viagra Lyon

buy zithromax a... (not verified)

cialis quebec

Priligy (not verified)

Le Vrai Prix Du Kamagra

Priligy (not verified)

cialis absorption food

priligy medicine (not verified)

Amoxicilina Usa Direct

lasix dosing (not verified)

Resultados Propecia

Zithromax (not verified)

cialis c'est quoi

Zithromax (not verified)

Testiculos Propecia

Plaquenil (not verified)

Buy Viagra India

Plaquenil (not verified)

Cialis 20 Mg Reimport

dapoxetine for ... (not verified)

Que Es El Propecia

plaquenil macul... (not verified)

propiedades del viagra

zithromax costs (not verified)

Cephalexin Canine Dog

promethazine (not verified)

Online Deltasone No Prescription

Zithromax (not verified)

Cialis Viagra Yahoo Respuestas

Priligy (not verified)

Cialis Deutsch

Lasix (not verified)

Amoxicillin Dose Cats

Priligy (not verified)

Canadian Pharmacy Shop

best site to bu... (not verified)

Mail Order Cialis Canada