From 13c558e3a0d9a56db98923ce3f08310ae1852bf7 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Thu, 2 Mar 2017 14:21:29 +0100 Subject: [PATCH] Limit fallback error width to window width Change the layout a bit to make sure the entire message can be read. --- app/styles/base.css | 24 +++++++++++++----------- vnc.html | 10 ++++++---- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/app/styles/base.css b/app/styles/base.css index f7c5de4b..ce31cf7e 100644 --- a/app/styles/base.css +++ b/app/styles/base.css @@ -216,19 +216,22 @@ select:active { */ #noVNC_fallback_error { - position: fixed; z-index: 1000; - left: 50%; - transform: translate(-50%, -50px); + visibility: hidden; +} +#noVNC_fallback_error.noVNC_open { + visibility: visible; +} + +#noVNC_fallback_error > div { + max-width: 90%; + padding: 15px; + transition: 0.5s ease-in-out; - visibility: hidden; + transform: translateY(-50px); opacity: 0; - top: 60px; - padding: 15px; - width: auto; - text-align: center; font-weight: bold; color: #fff; @@ -237,9 +240,8 @@ select:active { box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.5); background: rgba(200,55,55,0.8); } -#noVNC_fallback_error.noVNC_open { - transform: translate(-50%, 0); - visibility: visible; +#noVNC_fallback_error.noVNC_open > div { + transform: translateY(0); opacity: 1; } diff --git a/vnc.html b/vnc.html index 02fe5c69..b96b0aa1 100644 --- a/vnc.html +++ b/vnc.html @@ -72,10 +72,12 @@ -
-
noVNC encountered an error:
-
-
+
+
+
noVNC encountered an error:
+
+
+