From e2b455ecda1bc726234ed9df4ee4a972be6c1df3 Mon Sep 17 00:00:00 2001 From: Thor Galle Date: Sun, 1 Jan 2017 17:59:14 +0100 Subject: [PATCH] Vertically centered the header box --- styles/style.css | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/styles/style.css b/styles/style.css index b686bd8..06dbd5c 100644 --- a/styles/style.css +++ b/styles/style.css @@ -43,9 +43,9 @@ ul a:hover { .button { border: 0.1em solid white; border-radius: 0.4em; - margin-bottom: 1%; - margin-top: 2%; - padding: 1.2%; + margin-bottom: 1vw; + margin-top: 2vw; + padding: 1.2vw; } .button:hover { @@ -99,15 +99,19 @@ ul a:hover { .header_box { height: 100vh; + position: relative; } .header { - margin-top: 5%; + position: absolute; + top: 50%; + right: 50%; + transform: translate(50%,-50%); } .header h1 { font-size: 280%; - margin-bottom: 2%; + margin-bottom: 2vw; } .header h2 { @@ -148,6 +152,9 @@ ul a:hover { } .top_right { + position: absolute; + right: 0; + top: 0; margin: 2% 2% 0 auto; }