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!


Stromectol (not verified)

Cialis Compresse 20 Mg

Priligy (not verified)

Losec 20mg Tablets Online Walmart

buy prednisone ... (not verified)

Buy Avanafil Online

Priligy (not verified)

us cialis soft

priligy pills (not verified)

Candian Pharmcy

Priligy (not verified)

How Many Days To Take Amoxicillin

Prednisone (not verified)

Comment Utiliser Le Kamagra

Lasix (not verified)

Kamagra Aus China

can you buy str... (not verified)

citrato de sildenafil

Prednisone (not verified)

Achat Kamagra Super Active 25 Mg

Prednisone (not verified)

Cialis Generico Mg

order methyl pr... (not verified)

Acheter Viagra Geneve

azithromycin cvs (not verified)

Viagra Comparateur De Prix

buy zithromax o... (not verified)

Cialis And Ecuador Pharmacy

zithromax onlin... (not verified)

banned comercials cialis

plaquenil medication (not verified)

Zithromax And Sun Exposure

valtrex sold usa (not verified)

Canadian Pharmacy Lexapro No Rx Needed

hydroxychloroqu... (not verified)

Viagra Barata

will azithromyc... (not verified)

acheter cialis 10 mg france

will azithromyc... (not verified)

acheter cialis 10 mg france

can you buy pla... (not verified)

Venta Cialis Por Internet

plaquenil and sun (not verified)

Can I Purchase Provera Wakefield

hydroxychloroqu... (not verified)

Viagra 50 O 100

plaquenil and p... (not verified)

Viagra Cialis Douleurs

buy cheap ciali... (not verified)

Cialis Per Quanto Tempo

cialis (not verified)

Blue Force Pills

cheap generic cialis (not verified)

Allevamento Levitra

gabapentin 800 mg (not verified)

Propecia With Testosterone

neurontin for s... (not verified)

Viagra Alcool Danger

best place to b... (not verified)

Treatment For Gonorrhea Amoxicillin

azithromycin ta... (not verified)

Propecia Completo

where to order ... (not verified)

Cialis Pharmacy Online

viagra heart rate (not verified)

Cialis 20 Mg Comprime Pellicule Boite De 4

azithromycin z pack (not verified)

Levitra De 20 Mg

propecia before... (not verified)

Cialis Marseille

how long for pr... (not verified)

Will Keflex Work On Vaginal Infections

how long for pr... (not verified)

Will Keflex Work On Vaginal Infections