From 8b1413d2d4295f2c8e4359bf9fa2528e9809cf41 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Mon, 19 Nov 2018 01:56:29 +0100 Subject: Fix video width on small screen widths When the screen width gets small enough to clip the video, reduce the width of the video to the content width. Couldn't use the same larger-than-content-width layout, at least not easily, because the percentage would need to be dependent on the window width, not the width of the video element's container. --- assets/styles.css | 6 ++++++ assets/stylesheets/layout.hcss | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/assets/styles.css b/assets/styles.css index f70e50b..5db5988 100644 --- a/assets/styles.css +++ b/assets/styles.css @@ -167,6 +167,12 @@ ul { color: #c9ccb4; text-shadow: 1px 3px 5px #230f0f; } +@media screen and (max-width: 870px) { + .content video { + width: 100%; + margin-left: 0; + } +} @media screen and (max-width: 767px) { header { margin-left: -8px; diff --git a/assets/stylesheets/layout.hcss b/assets/stylesheets/layout.hcss index e06fc88..3eff9d4 100644 --- a/assets/stylesheets/layout.hcss +++ b/assets/stylesheets/layout.hcss @@ -113,6 +113,13 @@ ul { } +@media screen and (max-width: 870px) { + .content video { + width: 100%; + margin-left: 0; + } +} + @media screen and (max-width: 767px) { header { margin-left: -8px; -- cgit v1.2.3