From 64690ff2ed40d581c52ef976dea1cf71f5b37b10 Mon Sep 17 00:00:00 2001 From: Marcel Schindler Date: Wed, 11 Jul 2018 09:58:26 +0200 Subject: [PATCH] Allow responsive Iframes and make sure, Images won't break the layout --- css/skeleton.css | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/css/skeleton.css b/css/skeleton.css index f28bf6c..b1b85fc 100644 --- a/css/skeleton.css +++ b/css/skeleton.css @@ -416,3 +416,25 @@ there. /* Larger than Desktop HD */ @media (min-width: 1200px) {} + +/* Responsive Embeds. Use div class="fluidMedia" and then add embedding code */ +.fluidMedia { + padding-bottom: 56.25%; + padding-top: 30px; + height: 0; + overflow: hidden; + position: relative; +} + +.fluidMedia iframe { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; +} + +/* make sure, images won't crash the layout */ +img { + max-width: 100%; +}