From 06f03f0241f143a67e31850350b7b89a31643feb Mon Sep 17 00:00:00 2001 From: InigoGutierrez Date: Mon, 22 Aug 2022 02:48:10 +0200 Subject: Responsiveness! --- css/style.css | 128 ++++++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 93 insertions(+), 35 deletions(-) (limited to 'css/style.css') diff --git a/css/style.css b/css/style.css index e449697..7064fbf 100644 --- a/css/style.css +++ b/css/style.css @@ -1,15 +1,15 @@ body { background-color: #17212B; - margin: 80px auto; + margin: 10% auto; padding: 0 10%; max-width: 1100px; font-family: "Mononoki", "Open Sans", "Sans", "Arial"; text-align: left; line-height: 1.5em; - font-size: 1.1em; color: #A6B0B9; + font-size: 100%; } a:link { @@ -20,34 +20,32 @@ a:visited { color: #D7B3FF; } -h1 { - padding: 1em; +:focus { + outline: 2px solid white; +} +h1 { + padding: 1em 0; font-variant: small-caps; text-align: center; - line-height: 0.2em; - font-size: 2em; -} - -h1, .navbar { - color: #CBD7E1; - background-color: #2B5278; - box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); -} - -h1, .navbar, .navbar li { - border-radius: 5px; + line-height: 1em; + font-size: 4em; } .navbar { list-style-type: none; margin: 0; padding: 0; - overflow: hidden; + font-size: 1.1em; + display: flex; + flex-flow: row; + flex-wrap: wrap; + justify-content: space-around; } .navbar li { - float: left; + flex-basis: 10%; + flex-grow: 1; } .navbar .liright { @@ -57,54 +55,91 @@ h1, .navbar, .navbar li { .navbar li a { display: block; color: #CBD7E1; - padding: 10px 20px; + padding: 20px 20px; text-align: center; text-decoration: none; } -.navbar li:hover { +.navbar li:hover a { background-color: #C8E8FF; + color: #17212B; } -.navbar li:hover a { - color: #17212B; +h1, .navbar { + color: #CBD7E1; + background-color: #2B5278; + box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); +} + +h1, .navbar, .navbar a { + border-radius: 5px; +} + +section { + overflow: auto; + margin: 60px 0 20px; +} + +h2 { + font-size: 2.4em; + text-align: center; + margin: 40px 0; + line-height: 1.2em; } p { + font-size: 1.1em; text-indent: 2em; } -img { - margin: 15px 50px; - box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); - border-radius: 15px; +ul { + font-size: 1.1em; +} + +/* Aumentar tamaño de fuente sólo para el primer nivel de lista. */ +ul ul { + font-size: 1em; } .column { display: grid; } +.odd, .even { + margin: 0 10% 5%; + max-width: 50%; + height: auto; +} + .odd { float: left; + margin-left: 0; } .even { float: right; + margin-right: 0; } -.final { - display: block; - margin: auto; - text-align: center; +.even img, .odd img { + max-width: 100%; + height: auto; + margin: 0; } -section { - overflow: auto; - margin: 60px 0 20px; +img { + max-width: 100%; + box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); + border-radius: 15px; } -:focus { - outline: 2px solid white; +.final { + margin: 50px 0; + text-align: center; +} + +.final p { + text-indent: 0; } .oldButtons { @@ -128,3 +163,26 @@ section { box-shadow: none; background: white; } + +@media only screen and (max-width: 600px) { + + .odd, .even { + margin: 0 10% 20px; + max-width: 100%; + height: auto; + float: center; + } + + ul { + padding-left: 5%; + } + + body { + text-align: center; + } + + p { + text-indent: 0; + } + +} -- cgit v1.2.1