From 59f902b074cb321a9e785f2260c573323a4c94e7 Mon Sep 17 00:00:00 2001 From: meaz Date: Mon, 20 Jan 2020 15:53:37 +0100 Subject: [PATCH] center flex div automatically in all views --- themes/grav-theme-howto/css/media-queries.css | 11 ++++------- themes/grav-theme-howto/css/style.css | 4 +++- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/themes/grav-theme-howto/css/media-queries.css b/themes/grav-theme-howto/css/media-queries.css index 0601ce36b..0bdb2311c 100644 --- a/themes/grav-theme-howto/css/media-queries.css +++ b/themes/grav-theme-howto/css/media-queries.css @@ -17,10 +17,7 @@ display: none; } - #flex { - width: 90vw; - margin-left: 5vw; - } + #flex .columns { width: 50%; } @@ -113,9 +110,9 @@ } #flex { - width: 110vw; - margin-left: 0; - } + width: 100vw; + left: auto; + #flex .columns { height: auto; diff --git a/themes/grav-theme-howto/css/style.css b/themes/grav-theme-howto/css/style.css index d824029bb..d16e9fc18 100644 --- a/themes/grav-theme-howto/css/style.css +++ b/themes/grav-theme-howto/css/style.css @@ -74,8 +74,10 @@ a:hover { } #flex { - width: 80vw; margin-top: -50px; + width: 80vw; + position: relative; + left: calc(-40vw + 50%); /* display: flex; flex-direction: row; flex-wrap: wrap;