Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<header>
<h1 class="newspaper-name">Ironhack News</h1>
<nav>
<img class="image-menu" src="./images/menu-icon.png" alt="menu icon">
<ul class="navbar">
<li><a href="#">Home</a></li>
<li><a href="#">News</a></li>
Expand Down
124 changes: 117 additions & 7 deletions styles/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -27,7 +37,7 @@ body, h1, h2, h3, h4, h5, h6, p, ol, ul {
padding: 5px 8px;
font-size: 14px;
}

/* STYLES */

/* Fonts */
Expand Down Expand Up @@ -76,11 +86,19 @@ header {
border-bottom: 1px solid white;
}

nav img {
display: none;
width: 2.5em;
height: 2.5em;
padding: 0.3em;
}

.navbar {
list-style-type: none;
width: 100%;
display: flex;
justify-content: flex-start;
/* background-color: blue; */
}

.navbar li {
Expand Down Expand Up @@ -119,6 +137,7 @@ header {
width: 50%;
padding: 0 20px;
height: auto;
/* border: 1px solid black; */
}

.main-article .content {
Expand Down Expand Up @@ -175,5 +194,96 @@ header {
.btn-blue {
background-color: #007bff;
}

/* Write your CSS below */
@media (width < 480px) {
nav {
display: flex;
justify-content: center;
align-items: center;
}

.navbar {
display: none;
}

nav img {
display: block;
}

nav:hover img {
display: none;
}

nav:hover .navbar {
display: block;
}
}

@media (width < 760px) {
.navbar {
flex-direction: column;
align-items: center;
}

.navbar li {
border-bottom: 1px solid #ffffff;
width: 100%;
}

main {
/* flex-wrap: wrap; */
/* background-color: yellow; */
}

.main-article {
flex-direction: column;
align-items: center;
/* background-color: red; */
}

.main-article .image {
width: 100%;
height: auto;
}

.main-article .content {
width: 100%;
/* width: 200px; */
/* border: 1px solid black; */
}

.articles-container {
display: flex;
flex-direction: column;
align-items: center;
/* border: 1px solid black; */
/* background-color: green; */
}
.article {
width: 90%;
}
}

@media (min-width: 760px) and (max-width: 1024px) {
.navbar {
width: 100%;
flex-direction: row;
justify-content: center;
}
.navbar li {
width: 100%;
align-self: center;
}

.articles-container {
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
gap: 20px;
}

.article {
width: 45%;
}
}