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
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
<header>
<h1 class="newspaper-name">Ironhack News</h1>
<nav>
<div class="menu-icon">
<img src="images/menu-icon.png" alt="Menu Icon" />
</div>
<ul class="navbar">
<li><a href="#">Home</a></li>
<li><a href="#">News</a></li>
Expand Down
128 changes: 128 additions & 0 deletions styles/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,131 @@ header {
}

/* Write your CSS below */
.menu-icon {
display: none;
}

@media (max-width: 760px) {
.navbar {
flex-direction: column;
align-items: center;
}
.navbar li {
width: 100%;
border-right: none;
border-bottom: 1px solid #ffffff;
}
.navbar li:last-child {
border-bottom: none;
}
.main-article {
flex-direction: column;
width: 100%;
}
.main-article .image {
width: 100%;
padding: 0;
margin-bottom: 20px;
}
.main-article .content {
width: 100%;
padding: 0;
}
.articles-container {
flex-direction: column;
align-items: streth;
}
.article {
width: 100%;
margin-bottom: 20px;
}
.article:last-child {
margin-bottom: 0;
}
}

@media screen and (min-width: 760px) and (max-width: 1024px) {
.navbar {
flex-direction: row;
justify-content: space-around;
}
.navbar li {
flex: 1;
border-right: 1px solid #ffffff;
border-bottom: none;
}
.navbar li:last-child {
border-right: none;
}
.main-article {
flex-direction: row;
width: 100%;
margin: 20px 0;
}
.main-article .image {
width: 50%;
padding: 0 20px;
}
.main-article .content {
width: 48%;
padding: 0 20px;
}
.articles-container {
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between;
}
.article {
width: 48%;
margin-bottom: 20px;
}
.article:last-child {
width: 48%;
margin-top: 0;
}
}

@media screen and (max-width: 480px) {

.navbar {
display: none;
}
.menu-icon {
display: block;
text-align: center;
padding: 10px;
}
.menu-icon img {
width: 30px;
height: 30px;
}
header {
display: flex;
flex-direction: column;
align-items: center;
}

.newspaper-name {
font-size: 20px;
padding: 15px 10px;
}

.main-article {
margin: 10px;
padding: 15px;
}

.main-article .image {
margin-bottom: 15px;
}

.article {
margin-bottom: 15px;
padding: 15px;
}

.btn {
padding: 12px 24px;
font-size: 16px;
}
}