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
48 changes: 48 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<title>Flexbox Responsive</title>
</head>
<body>
<!-- Englobo el header y hero en un section para el flex column -->
<section id="heading"">
<section id="header">
<p><strong>Header</strong></p>
<p>Lorem ipsum dolo</p>
</section>

<section id="hero">
<p><strong>Hero</strong></p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse sem mi, porta condimentum mauris eu, auctor ornare dui.</p>
</section>
</section>

<!-- Englobo el content y sidebar para el flex row [Table - Desktop] -->
<section id="contenedor"">
<section id="content">
<p><strong>Content</strong></p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse sem mi, porta condimentum mauris eu, auctor ornare dui. Nunc semper consectetur libero, eget pharetra elit tempor sed. Integer vel molestie ligula, et varius lacus. In commodo placerat ligula, ut scelerisque ex auctor nec. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p>
<p>In ut posuere ligula. Proin volutpat dapibus nibh, nec lacinia ligula vulputate et. Sed lacinia, arcu a eleifend blandit, lacus libero cursus nunc, nec interdum purus urna nec massa. Donec volutpat sollicitudin risus, eget iaculis mauris tincidunt vel. Nullam ac dapibus ex. Phasellus dapibus nunc eu nunc volutpat sollicitudin. Phasellus convallis mollis mi faucibus faucibus.</p>
</section>

<section id="sidebar">
<p><strong>Sidebar</strong></p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse sem mi, porta condimentum mauris eu, auctor ornare dui. Nunc semper consectetur libero, eget pharetra elit tempor sed. Integer vel molestie ligula, et varius lacus.</p>
</section>
</section>


<!-- Acá englobo el footer -->
<section id="footer">
<footer>
<p><strong>Footer</strong></p>
<p>In ut posuere ligula. Proin volutpat dapibus nibh, nec lacinia ligula vulputate et. Sed lacinia, arcu a eleifend blandit, lacus libero cursus nunc, nec interdum purus urna nec massa. Donec volutpat sollicitudin risus, eget iaculis mauris tincidunt vel. Nullam ac dapibus ex. Phasellus dapibus nunc eu nunc volutpat sollicitudin.</p>
</footer>
</section>

</body>
</html>
226 changes: 226 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,226 @@
/* Medidas para móvil max 450px */
@media screen, (max-width : 450px) {

body{
background-color : black;
margin: 10px;
}

/* Con heading agrupo el header y el hero del HTML */
#heading{
display : flex;
flex-direction : column;
width : 100%;
margin-top : 7px;
}

#header {
width : 100%;
height : 90px;
color : white;
font-size : 30px;
background-color : #33CCFF;
font-size : 20px;
margin-top : 3px;
}

p {
margin-top : 12px;
margin-left : 12px;
margin-right : 10px;
font-size : 15px;
}

#hero {
width : 100%;
height : 110px;
color : white;
font-size : 30px;
background-color : red;
font-size : 30px;
margin-top : 3px;
}

#content {
width : 100%;
height : 285px;
color : white;
font-size : 30px;
background-color : green;
margin-top : 3px;
padding-top : 1px;
padding-bottom : 15px;
}

#sidebar {
width: 100%;
height : 140px;
color : white;
font-size : 30px;
background-color : #7400E1;
margin-top : 3px;
padding-top : 1px;

}

#footer {
width : 100%;
height : 180px;
font-size : 30px;
color : white;
background-color : #808080;
margin-top : 3px;
padding-top : 1px;
}

}

/* Medidas para la tablet 451px */
@media ( min-width: 451px ) {

body{
background-color: black;
margin: 12px;
}

#heading{
display : flex;
flex-direction : column;
width : 100%;
margin-top : 7px;
}

#header {
width : 100%;
height : 80px;
color : white;
font-size : 30px;
background-color : #33CCFF;
font-size : 20px;
margin-top : 3px;

}

#hero {
width : 100%;
height : 110px;
color : white;
font-size : 30px;
background-color : red;
font-size : 30px;
margin-top : 3px;

}

#contenedor{
display: flex;
flex-direction: row;
}

#content {
width : 60%;
height : 450px;
color : white;
font-size : 30px;
background-color : green;
margin-top : 3px;
}

#sidebar {
width : 40%;
height : 465px;
color : white;
font-size : 30px;
background-color : #7400E1;
margin-top : 3px;
margin-left : 3px;

}

#footer {
width : 100%;
height : 165px;
font-size : 30px;
color : white;
background-color : #808080;
margin-top : 3px;
}

}

/* medidas para Desktop 1024px */
@media (min-width: 1024px) {

body{
background-color: black;
}

#heading{
display: flex;
flex-direction: column;
width: 100%;
margin-top: 7px;
}

#header {
width : 100%;
height : 80px;
color : white;
font-size : 30px;
background-color : #33CCFF;
font-size : 20px;
margin-top : 3px;

}

#hero {
width : 100%;
height : 110px;
color : white;
font-size : 30px;
background-color : red;
font-size : 30px;
margin-top : 3px;

}

#contenedor{
display: flex;
flex-direction: row;
width: 75%;
margin: auto;
}


#content {
width : 70%;
height : 380px;
color : white;
font-size : 30px;
background-color : green;
margin-top : 3px;

}

#sidebar {
width: 40%;
height : 395px;
color : white;
font-size : 30px;
background-color : #7400E1;
margin-top : 3px;
margin-left : 3px;

}

#footer {
width : 100%;
height : 105px;
font-size : 30px;
color : white;
background-color : #808080;
margin-top : 3px;
margin-bottom: 5px;
}

}