Skip to content
Open

lab 2 #556

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 @@ -16,6 +16,7 @@ <h1 class="newspaper-name">Ironhack News</h1>
<li><a href="#">Tech</a></li>
<li><a href="#">Sports</a></li>
</ul>
<img src="images/menu-icon.png" alt="Menu" class="menu-icon" />
</nav>
</header>

Expand Down
101 changes: 101 additions & 0 deletions styles/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,104 @@ header {
}

/* Write your CSS below */

@media screen and (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;
margin: 10px;
padding: 10px;
}

.main-article .image,
.main-article .content {
width: 100%;
padding: 0;
}

.articles-container {
flex-direction: column;
align-items: center;
padding: 10px;
}

.article {
width: 100%;
margin-bottom: 20px;
}
}


@media screen and (min-width: 761px) and (max-width: 1024px) {
.navbar {
flex-direction: row;
justify-content: center;
flex-wrap: wrap;
}

.navbar li {
width: 120px;
border-right: 1px solid #ffffff;
border-bottom: none;
}

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

.main-article {
flex-direction: column;
margin: 15px;
padding: 15px;
}

.main-article .image,
.main-article .content {
width: 100%;
padding: 0;
}

.articles-container {
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between;
padding: 15px;
}

.article {
width: 48%;
margin-bottom: 15px;
}
}

.menu-icon {
display: none;
width: 30px;
height: 30px;
cursor: pointer;
}

@media screen and (max-width: 760px) {
.navbar {
display: none;
}

.menu-icon {
display: block;
margin: 10px auto;
}
}