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
Binary file added images/menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
<title>Ironhack News</title>
<link rel="stylesheet" href="styles/style.css" />
</head>

<body>
<header>
<h1 class="newspaper-name">Ironhack News</h1>
<nav>
<nav class="top">
<ul class="navbar">
<li><a href="#">Home</a></li>
<li><a href="#">News</a></li>
Expand All @@ -20,6 +21,8 @@ <h1 class="newspaper-name">Ironhack News</h1>
</header>

<main>


<article class="main-article">
<div class="image">
<img src="/images/main-article.jpg" alt="Article 1 Image" />
Expand Down
104 changes: 104 additions & 0 deletions styles/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,107 @@ header {
}

/* Write your CSS below */


@media screen and (max-width:760px){
ul.navbar
{
display: flex;
flex-direction: column;
/* background-color: #007bff; */
}

.navbar li
{
width: 100%;
border-bottom:2px solid #ccc;

}

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

main
{
display: flex;
flex-direction: column;
gap: 10px;
justify-content: space-between;
justify-content: stretch;
}

.articles-container
{
flex-direction: column;
}

main > .main-article,
main > .articles-container > .article {
width: 80vw;
display: flex;
flex: 1;
flex-direction: column;
justify-content: space-between;
padding: 16px;
border: 1px solid #ccc;
box-sizing: border-box;
}

article
{

display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
}

@media (min-width: 760px) , (max-width: 1024px)
{
ul.navbar
{
display: flex;
flex-direction: row;
background-color: #007bff;
}

.navbar li
{
width: 100%;
border-right:2px solid #ccc;

}

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

@media screen and (max-width: 480px)
{
ul.navbar
{
display: flex;
flex-direction: row;
}

.navbar li
{
width: 100%;
border-right:2px solid #ccc;

}

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


}


}