Skip to content

Commit 17b57ee

Browse files
committed
Make images responsive
Adjust the images size on smaller viewports by setting max-width to 100%. Preserve the 640px maximum width by setting it on the parent div element Set symmetrical horizontal margins to always keep the images in the center. Remove the horizontal margin on small viewports to make the images bigger.
1 parent 2d8c2f7 commit 17b57ee

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

html/css/ejs.css

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,9 +347,19 @@ blockquote footer:before {
347347
}
348348

349349

350-
div.image img {
350+
div.image {
351351
max-width: 640px;
352-
margin-left: 30px;
352+
margin: 0 30px;
353+
}
354+
355+
@media screen and (max-width: 500px) {
356+
div.image {
357+
margin: 0;
358+
}
359+
}
360+
361+
div.image img {
362+
max-width: 100%;
353363
}
354364

355365
div.solution:before {

0 commit comments

Comments
 (0)