Skip to content

Commit 3c22595

Browse files
committed
Beautify and fix responsive design
1 parent 62b8325 commit 3c22595

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

interactive/vector-addition.html

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
max-width: 1200px;
3939
margin: 20px auto;
4040
gap: 20px;
41-
width: 100%;
41+
width: 95%;
4242
}
4343
#vector-input {
4444
display: flex;
@@ -59,7 +59,7 @@
5959
}
6060
#instructions {
6161
max-width: 800px;
62-
margin: 20px auto;
62+
margin: 20px 20px;
6363
padding: 20px;
6464
background-color: #fff;
6565
border-radius: 10px;
@@ -78,6 +78,23 @@
7878
}
7979
textarea {
8080
width: 100%;
81+
height: auto; /* Adjust height to content on narrow viewports */
82+
min-height: 6em;
83+
}
84+
#plot {
85+
width: 100%;
86+
height: auto; /* Adjust height to content on narrow viewports */
87+
}
88+
#instructions {
89+
margin-top: 20px; /* Add some space between plot and instructions */
90+
margin-left: 5%
91+
width: 85%; /* Ensure it takes full width on narrower devices */
92+
}
93+
}
94+
@media (max-width: 480px) {
95+
#intro, #instructions {
96+
margin: auto 10px;
97+
padding: 10px; /* Reduce padding for very small screens */
8198
}
8299
}
83100
</style>

0 commit comments

Comments
 (0)