Adjust chart layout for improved responsiveness and image fitting

This commit is contained in:
2025-01-30 10:25:46 +02:00
parent 4951b1138c
commit 6d64c97858

View File

@@ -96,17 +96,21 @@ form button {
} }
#chart { #chart {
flex: 1; flex: 2; /* Take 2/3 of the width */
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
padding: 20px; padding: 20px;
width: 100%; /* Ensure chart takes full width */ width: 100%;
height: 75%; /* Ensure the container takes full height */
} }
#chart img { #chart img {
max-width: 100%; max-width: 100%;
height: auto; max-height: 100%;
height: 100%; /* Ensure the image fits vertically 100% */
width: 100%; /* Ensure the image spans 100% width */
object-fit: contain; /* Ensure the image fits within the container */
} }
#question-block { #question-block {
@@ -126,6 +130,11 @@ form button {
#chart { #chart {
margin-bottom: 0; margin-bottom: 0;
flex: 2; /* Ensure it takes 2/3 of the width on larger screens */
}
#question-block {
flex: 1; /* Take 1/3 of the width */
} }
} }