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
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h1 class="newspaper-name">Ironhack News</h1>
<main>
<article class="main-article">
<div class="image">
<img src="/images/main-article.jpg" alt="Article 1 Image" />
<img src="images/main-article.jpg" alt="Article 1 Image" />
</div>
<div class="content">
<h2>Main Article</h2>
Expand Down
83 changes: 60 additions & 23 deletions styles/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,23 @@ 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;
Expand All @@ -27,7 +38,7 @@ body, h1, h2, h3, h4, h5, h6, p, ol, ul {
padding: 5px 8px;
font-size: 14px;
}

/* STYLES */

/* Fonts */
Expand All @@ -40,9 +51,6 @@ main {
max-width: 1000px;
margin: 0 auto;
padding: 10px 20px;
display: flex;
flex-direction: column;
align-items: center;
}

/* Font sizes */
Expand Down Expand Up @@ -80,16 +88,13 @@ header {
list-style-type: none;
width: 100%;
display: flex;
flex-direction: column;
justify-content: flex-start;
}

.navbar li {
width: 130px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
border-right: 1px solid #ffffff;
display: block;
border: 1px solid #ffffff;
}

.navbar li:last-child {
Expand All @@ -108,6 +113,7 @@ header {
padding: 20px;
border: 1px solid #ccc;
display: flex;
flex-direction: column;
}

.main-article img {
Expand All @@ -116,30 +122,24 @@ header {
}

.main-article .image {
width: 50%;
padding: 0 20px;
height: auto;
}

.main-article .content {
width: 50%;
padding: 0 20px;
height: auto;
}

.articles-container {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
flex-direction: row;
align-items: center;
padding: 20px;
}

.article {
width: 29%;
padding: 20px;
margin: 20px;
border: 1px solid #ccc;
/* display: flex; */
}

.article img {
Expand Down Expand Up @@ -175,5 +175,42 @@ header {
.btn-blue {
background-color: #007bff;
}

/* Write your CSS below */

.navbar a {
display: block;
}

@media (min-width:760px) {
.navbar {
flex-direction: row;
justify-content: space-around;
padding: 1em;
}

.article {
flex-direction: column;
margin: 20px;
flex-wrap: wrap;
}

.articles-container {
flex-wrap: wrap;
display: flex;
flex-direction: row;
}

.articles-container .article {
flex-basis: 45%;

}

.main-article {
margin: 20px;
padding: 20px;
border: 1px solid #ccc;
flex-direction: row;
}

}