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 src="images/menu-icon.png" alt="menu icon" class="menu-icon">
<ul class="navbar">
<li><a href="#">Home</a></li>
<li><a href="#">News</a></li>
Expand Down
88 changes: 88 additions & 0 deletions styles/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ header {
padding: 10px;
border-bottom: 1px solid white;
}
.menu-icon {
display: none;
width: 30px;
height: auto;

}

.navbar {
list-style-type: none;
Expand Down Expand Up @@ -177,3 +183,85 @@ header {
}

/* Write your CSS below */

@media all and (max-width: 760px) {
.navbar {
flex-direction: column;
align-item: center;
}
.navbar li {
border-bottom: 1px solid white;
border-right: 0;
width: 100%;
padding: 2rem;
}
.navbar li:last-child { border-bottom:0 }

.main-article {
display: flex;
flex-direction: column;
align-items: center;
width:100%;
}
.articles-container {
display: flex;
flex-direction: column;
gap: 20px;
width: 100%;
padding:0;
}

.articles-container .article {
width:100%
}

}

@media (min-width: 760px) and (max-width: 1024px) {
.navbar {
display: flex;
justify-content: space-between;
padding: 0;
margin: 0;
}

.navbar li {
flex: 1;
list-style: none;
}

.navbar li:last-child a {
border-right: none;
}

.main-article {
display: flex;
flex-direction: row;
align-items: center;
gap: 20px;
width: 100%;
margin-bottom: 20px;
}

.main-article img {
width: 50%;
height: auto;
border-radius: 8px;
}
.main-article .content {
width: 50%;
}
}

@media (max-width: 480px) {
.navbar {
display: none;
}
.menu-icon {
display: block;
justify-content: center;
align-items: cente;
}
}