From 5619d57b5736067000de4919452bbb0392a43a3e Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Tue, 20 Nov 2018 12:11:01 +0100 Subject: Keep video aspect ratio at small screen widths At small screen widths, the video's height would stay fixed at the pixel value defined in its `height` attribute. Ensure that when its width becomes dependent on the window width, the height follows accordingly. --- assets/styles.css | 1 + assets/stylesheets/layout.hcss | 1 + 2 files changed, 2 insertions(+) diff --git a/assets/styles.css b/assets/styles.css index 5db5988..afcac9b 100644 --- a/assets/styles.css +++ b/assets/styles.css @@ -170,6 +170,7 @@ ul { @media screen and (max-width: 870px) { .content video { width: 100%; + height: auto; margin-left: 0; } } diff --git a/assets/stylesheets/layout.hcss b/assets/stylesheets/layout.hcss index 3eff9d4..98fdca6 100644 --- a/assets/stylesheets/layout.hcss +++ b/assets/stylesheets/layout.hcss @@ -116,6 +116,7 @@ ul { @media screen and (max-width: 870px) { .content video { width: 100%; + height: auto; margin-left: 0; } } -- cgit v1.2.3