From eaf821f5801572bc1268887acf3dfbc80c8f4cb3 Mon Sep 17 00:00:00 2001
From: aqquq <jannik.wurche@student.uni-halle.de>
Date: Tue, 2 Jul 2024 09:28:52 +0200
Subject: [PATCH] =?UTF-8?q?=F0=9F=91=80=20fix=20media=20scale?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/Pages/QuizView.elm |  5 +++--
 src/style.css          | 15 ++++++++++++---
 2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/src/Pages/QuizView.elm b/src/Pages/QuizView.elm
index 81149e3..b78abd7 100644
--- a/src/Pages/QuizView.elm
+++ b/src/Pages/QuizView.elm
@@ -77,8 +77,9 @@ displayQuestion q =
             , div [ class "header-task" ] [ LaTeX.Expression.compile q.task ]
             ]
         , hintDiv
-        , imageDiv
-        , funcDiv
+        , div [ class "media" ] 
+            [ imageDiv
+            , funcDiv ]
         , answerDiv ]
 
 -- Updated displayMCQ function
diff --git a/src/style.css b/src/style.css
index 76e153a..87d17d0 100644
--- a/src/style.css
+++ b/src/style.css
@@ -17,9 +17,6 @@ svg {
   width: 100%;
   height: 100%;
   background-color: #fff;
-  
-  max-height: 75vh;
-  max-width: 75vw;
 }
 
 .btn {
@@ -67,6 +64,18 @@ svg {
   margin-bottom: 10px;
 }
 
+div.media {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+div.imgDiv, div.svgDiv {
+  width: 50%;
+  max-width: 500px;
+  max-height: 500px;
+}
+
 div.center {
   background-color: #333;
   border-radius: 15px;
-- 
GitLab