From 6c95cd5fe9ba49ff44fdea8a76cb18c738396570 Mon Sep 17 00:00:00 2001 From: carliitosway-collab Date: Tue, 11 Nov 2025 18:02:51 +0100 Subject: [PATCH] ejercicio terminado --- styles/style.css | 134 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 128 insertions(+), 6 deletions(-) diff --git a/styles/style.css b/styles/style.css index 9571ab1..aa503b3 100644 --- a/styles/style.css +++ b/styles/style.css @@ -4,12 +4,23 @@ html { box-sizing: border-box; font-size: 16px; } - -*, *:before, *:after { + +*, +*:before, +*:after { box-sizing: inherit; } - -body, h1, h2, h3, h4, h5, h6, p, ol, ul { + +body, +h1, +h2, +h3, +h4, +h5, +h6, +p, +ol, +ul { margin: 0; padding: 0; font-weight: lighter; @@ -27,7 +38,7 @@ body, h1, h2, h3, h4, h5, h6, p, ol, ul { padding: 5px 8px; font-size: 14px; } - + /* STYLES */ /* Fonts */ @@ -175,5 +186,116 @@ header { .btn-blue { background-color: #007bff; } - + /* Write your CSS below */ + + +@media (max-width: 760px) { + + nav ul { + display: flex; + flex-direction: column; + gap: 10px; + text-align: center; + padding: 0; + } + + nav ul li { + list-style: none; + } + + nav ul il a { + display: block; + padding: 10px; + } + + .main-article { + display: flex; + flex-direction: column; + gap: 20px; + } + + .main-article .image img { + width: 100%; + height: auto; + } + + .articles-container { + display: flex; + flex-direction: column; + gap: 20px; + } + + .articles-container .article { + width: 100%; + } + + .articles-container .article img { + width: 100; + height: auto; + } +} + + + +/*tablet*/ + + + +@media (min-width: 760px) and (max-width: 1024px) { + + + .navbar { + display: flex; + flex-direction: row; + justify-content: space-between; + padding: 0; + margin: 0; + } + + .navbar li { + list-style: none; + flex: 1; + } + + .navbar a { + padding: 10px 0px; + display: block; + text-align: center; + } + + .main-article { + display: flex; + flex-direction: row; + gap: 20px; + } + + .main-article .image { + width: 40%; + } + + .main-article .image img { + width: 100%; + height: auto; + } + + .main-article .content { + width: 60%; + } + + + .articles-container { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 20px; + } + + .articles-container .article img { + width: 100%; + height: auto; + } + + .articles-container .article { + width: 100%; + } +} \ No newline at end of file