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
11 changes: 9 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,22 @@
<body>
<header>
<h1 class="newspaper-name">Ironhack News</h1>
<nav>
<nav class="menu-item">
<ul class="navbar">
<li><a href="#">Home</a></li>
<li><a href="#">News</a></li>
<li><a href="#">Tech</a></li>
<li><a href="#">Sports</a></li>
</ul>
</nav>

<nav class="menu-item-burger">
<ul class="navbar">
<li>
<a href="#"><img src="./images/menu-icon.png" alt="burger-menu" /></a>
</li>
</ul>
</nav>
</header>

<main>
Expand Down Expand Up @@ -71,7 +79,6 @@ <h2>Article 3</h2>
</section>
</main>


<!-- DO NOT REMOVE - viewport width label -->
<span class="viewport-dimensions"></span>
<!-- DO NOT REMOVE - A simple JS script used to display the viewport width label -->
Expand Down
107 changes: 99 additions & 8 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 @@ -70,10 +80,19 @@ header {
text-align: center;
}

nav {
width: 100%;
}

.newspaper-name {
font-size: 24px;
padding: 10px;
border-bottom: 1px solid white;
}

@media screen and (min-width: 481px) {
.newspaper-name {
border-bottom: 1px solid white;
}
}

.navbar {
Expand Down Expand Up @@ -175,5 +194,77 @@ header {
.btn-blue {
background-color: #007bff;
}


/* Responsive Design */
@media screen and (max-width: 760px) {
.navbar {
flex-direction: column;
align-items: stretch;
}

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

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

.articles-container {
flex-direction: column;
align-items: stretch;
}
.articles-container article {
width: 100%;
}
}

@media screen and (min-width: 760px) and (max-width: 1024px) {
.navbar {
flex-direction: row;
align-items: stretch;
}

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

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

.articles-container {
flex-direction: row;
}
.articles-container article {
width: 50%;
}
}

@media screen and (max-width: 480px) {
.menu-item {
display: none;
}
.menu-item-burger {
display: block;
}

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

.articles-container {
flex-direction: column;
align-items: stretch;
}
.articles-container article {
width: 100%;
}
}

/* Write your CSS below */