From cfa79872c516409c5278ba944ceb06b9e38d7cd8 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Wed, 28 May 2025 04:25:45 +0200 Subject: [PATCH] Update CSS for index.html to improve layout and positioning of elements --- node/server/public/index.html | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/node/server/public/index.html b/node/server/public/index.html index df5a191..671bb74 100644 --- a/node/server/public/index.html +++ b/node/server/public/index.html @@ -16,29 +16,25 @@ html, body { width: 100vw; height: 100vh; - margin: 0; padding: 0; + margin: 0; + padding: 0; overflow: hidden; background: #000; } #viewer { - position: fixed; /* fills window, always on top */ + position: fixed; inset: 0; width: 100vw; height: 100vh; - background: #000; overflow: hidden; - display: flex; - justify-content: center; - align-items: center; - z-index: 1; + background: #000; } canvas { display: block; - width: 100vw; /* so that Three.js resizing works right */ - height: 100vh; - max-width: none; - max-height: none; - pointer-events: auto; + position: absolute; + left: 50%; top: 50%; + transform: translate(-50%, -50%); + /* width/height wird durch JS gesetzt */ } /* Optional: Overlay z-index */ #spirit-info {