From 32a63811fa02be0d13d3eae917837a6246ec7e23 Mon Sep 17 00:00:00 2001 From: Matthew Grove Date: Mon, 10 Dec 2018 16:08:46 +0000 Subject: [PATCH] Make images look better in iframes Dynamically change width depending on viewport size --- .../css/presentation-imports.css | 27 ++++++++++++++++++- .../css/presentation-imports.css~ | 18 +++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 computer-science-blog/css/presentation-imports.css~ diff --git a/computer-science-blog/css/presentation-imports.css b/computer-science-blog/css/presentation-imports.css index 23af745..84629cc 100644 --- a/computer-science-blog/css/presentation-imports.css +++ b/computer-science-blog/css/presentation-imports.css @@ -3,11 +3,36 @@ html, body { background: transparent; } img { - width: 70%; + width: 50%; box-shadow: 3px 3px 6px 2px rgba(10,10,10,0.5); margin: 10px; border-radius: 6px; } +@media screen and (max-width: 1000px) { + img { + width: 60%; + } +} +@media screen and (max-width: 900px) { + img { + width: 70%; + } +} +@media screen and (max-width: 800px) { + img { + width: 80%; + } +} +@media screen and (max-width: 700px) { + img { + width: 90%; + } +} +@media screen and (max-width: 600px) { + img { + width: 100%; + } +} /* revert changes made by Bootstrap */ p { diff --git a/computer-science-blog/css/presentation-imports.css~ b/computer-science-blog/css/presentation-imports.css~ new file mode 100644 index 0000000..23af745 --- /dev/null +++ b/computer-science-blog/css/presentation-imports.css~ @@ -0,0 +1,18 @@ +html, body { + font-family: 'Roboto'; + background: transparent; +} +img { + width: 70%; + box-shadow: 3px 3px 6px 2px rgba(10,10,10,0.5); + margin: 10px; + border-radius: 6px; +} + +/* revert changes made by Bootstrap */ +p { + margin: 0; +} +h1, h2, h3, .h1, .h2, .h3 { + margin-top: 0; +}