diff --git a/index.html b/index.html index 1b8846b..93e6265 100644 --- a/index.html +++ b/index.html @@ -16,13 +16,14 @@

Ironhack News

  • Tech
  • Sports
  • + menu icon
    - Article 1 Image + Article 1 Image

    Main Article

    @@ -71,7 +72,6 @@

    Article 3

    - diff --git a/styles/style.css b/styles/style.css index 9571ab1..6941120 100644 --- a/styles/style.css +++ b/styles/style.css @@ -4,18 +4,28 @@ 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; } - /* DO NOT REMOVE - Styling for the label showing the viewport width */ .viewport-dimensions { position: fixed; @@ -27,7 +37,7 @@ body, h1, h2, h3, h4, h5, h6, p, ol, ul { padding: 5px 8px; font-size: 14px; } - + /* STYLES */ /* Fonts */ @@ -102,6 +112,10 @@ header { font-weight: bold; } +.menu-icon { + display: none; +} + /* Articles */ .main-article { margin: 20px; @@ -175,5 +189,460 @@ header { .btn-blue { background-color: #007bff; } - + /* Write your CSS below */ + +@media screen and (max-width: 760px) { + /* STYLES */ + + /* Fonts */ + body { + font-family: "Helvetica", sans-serif; + } + + /* Basic styles */ + main { + max-width: 1000px; + margin: 0 auto; + padding: 10px 20px; + display: flex; + flex-direction: column; + align-items: center; + } + + /* Font sizes */ + p { + font-size: 1em; + } + + h1 { + font-size: 3em; + } + + h2 { + font-size: 2em; + margin-bottom: 1em; + } + + h3 { + font-size: 1.5em; + } + + /* Header and Navbar */ + header { + background-color: #333; + color: #fff; + text-align: center; + } + + .newspaper-name { + font-size: 24px; + padding: 10px; + border-bottom: 1px solid white; + border-left: 1px solid #ffffff; + } + + .navbar { + list-style-type: none; + width: 100%; + display: flex; + flex-direction: column; + } + + .navbar li { + width: 100%; + height: 40px; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + border-bottom: 1px solid #ffffff; + border-right: none; + border-left: 1px solid #ffffff; + } + + .navbar a { + text-decoration: none; + color: #fff; + font-weight: bold; + } + + /* Articles */ + .main-article { + margin: 20px; + padding: 20px; + border: 1px solid #ccc; + display: flex; + flex-direction: column; + } + + .main-article img { + width: 225%; + height: auto; + display: flex; + justify-content: center; + margin-bottom: 15px; + } + + .article img { + width: 100%; + height: auto; + display: flex; + justify-content: center; + } + + .main-article .content { + width: 100%; + padding: 0 20px; + height: auto; + } + + .articles-container { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + flex-direction: column; + align-items: center; + padding: 20px; + gap: 30px; + } + + .article { + width: 100%; + padding: 20px; + border: 1px solid #ccc; + } + + .article img { + width: 100%; + height: auto; + } + + .article h2 { + font-size: 20px; + margin-top: 10px; + } + + .article p { + margin-top: 10px; + } + + .btn { + background-color: #333; + color: #fff; + padding: 10px 20px; + border: none; + border-radius: 5px; + font-size: 1em; + font-weight: bold; + text-decoration: none; + margin-top: 30px; + } + + .btn:hover { + background-color: #555; + } + + .btn-blue { + background-color: #007bff; + } +} + +@media screen and (min-width: 760px) and (max-width: 1024px) { + /* STYLES */ + + /* Fonts */ + body { + font-family: "Helvetica", sans-serif; + } + + /* Basic styles */ + main { + max-width: 1000px; + margin: 0 auto; + padding: 10px 20px; + display: flex; + flex-direction: column; + align-items: center; + } + + /* Font sizes */ + p { + font-size: 1em; + } + + h1 { + font-size: 3em; + } + + h2 { + font-size: 2em; + margin-bottom: 1em; + } + + h3 { + font-size: 1.5em; + } + + /* Header and Navbar */ + header { + background-color: #333; + color: #fff; + text-align: center; + } + + .newspaper-name { + font-size: 24px; + padding: 10px; + border-bottom: 1px solid white; + } + + .navbar { + list-style-type: none; + width: 100%; + display: flex; + justify-content: flex-start; + } + + .navbar li { + width: 100%; + height: 40px; + display: flex; + align-items: center; + justify-content: center; + border-right: 1px solid #ffffff; + } + + .navbar li:last-child { + border-right: none; + } + + .navbar a { + text-decoration: none; + color: #fff; + font-weight: bold; + } + + /* Articles */ + .main-article { + margin: 20px; + padding: 20px; + border: 1px solid #ccc; + display: flex; + } + + .main-article img { + width: 100%; + height: auto; + } + + .main-article .image { + width: 50%; + padding: 0 20px; + height: auto; + } + + .main-article .content { + width: 50%; + padding: 0 20px; + height: auto; + } + + .articles-container { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + flex-direction: row; + align-items: center; + padding: 20px; + } + + .article { + width: 45%; + padding: 20px; + border: 1px solid #ccc; + margin-bottom: 5%; + } + + .article img { + width: 100%; + height: auto; + } + + .article h2 { + font-size: 20px; + margin-top: 10px; + } + + .article p { + margin-top: 10px; + } + + .btn { + background-color: #333; + color: #fff; + padding: 10px 20px; + border: none; + border-radius: 5px; + font-size: 1em; + font-weight: bold; + text-decoration: none; + margin-top: 30px; + } + + .btn:hover { + background-color: #555; + } + + .btn-blue { + background-color: #007bff; + } +} + +@media screen and (max-width: 480px) { + /* STYLES */ + + /* Fonts */ + body { + font-family: "Helvetica", sans-serif; + } + + /* Basic styles */ + main { + max-width: 1000px; + margin: 0 auto; + padding: 10px 20px; + display: flex; + flex-direction: column; + align-items: center; + } + + /* Font sizes */ + p { + font-size: 1em; + } + + h1 { + font-size: 3em; + } + + h2 { + font-size: 2em; + margin-bottom: 1em; + } + + h3 { + font-size: 1.5em; + } + + /* Header and Navbar */ + header { + background-color: #333; + color: #fff; + text-align: center; + } + + .newspaper-name { + font-size: 24px; + padding: 10px; + border: 0; + } + + .navbar, + .navbar li, + .navbar a { + display: none; + border: 0; + padding: 0; + margin: 0; + } + + .menu-icon { + display: block; + margin: 0 auto; + padding-bottom: 10px; + margin-bottom: 20px; + } + + /* Articles */ + .main-article { + margin: 0; + padding: 0; + border: 1px solid #ccc; + display: flex; + flex-direction: column; + padding-bottom: 20px; + } + + .main-article img { + width: 240%; + height: auto; + display: flex; + justify-content: center; + margin: 10px 0; + } + + .article img { + width: 100%; + height: auto; + display: flex; + justify-content: center; + } + + .main-article .content { + width: 100%; + padding: 0 20px; + height: auto; + margin-top: 10px; + } + + .articles-container { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + flex-direction: column; + align-items: center; + padding: 20px; + gap: 30px; + } + + .article { + width: 100%; + padding: 20px; + border: 1px solid #ccc; + } + + .article img { + width: 100%; + height: auto; + } + + .article h2 { + font-size: 20px; + margin-top: 10px; + } + + .article p { + margin-top: 10px; + } + + .btn { + background-color: #333; + color: #fff; + padding: 10px 20px; + border: none; + border-radius: 5px; + font-size: 1em; + font-weight: bold; + text-decoration: none; + margin-top: 30px; + } + + .btn:hover { + background-color: #555; + } + + .btn-blue { + background-color: #007bff; + } +}