Ejercicio 1
Ejercicio 1
CÓDIGO HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<<link rel="stylesheet" href="texto.css">
<title>Document</title>
</head>
<body>
<h1>Responsive Grids | collapse to full width single column</h1>
<div class="container">
<div class="c1">Content Area 1</div>
<div class="2col">
<div class="c2">Content Area 2</div>
<div class="c3">Content Area 3</div>
</div>
<div class="3col">
<div class="c4">Content Area 4</div>
<div class="c5">Content Area 5</div>
<div class="c6">Content Area 6</div>
</div>
</div>
</body>
</html>
CÓDIGO CSS
html, body{
margin: 0; .c1{
padding: 0; display: inline-block;
font-family: 'Ubuntu'; padding: 120px 0;
} margin: 0px auto;
width: 100%;
h1{ text-align: center;
text-align: center; background-color: rgb(255, 184, 126);
padding: 20px 0; }
}
.c2{
.container{ display: inline-block;
max-width: 1200px; float: left;
margin: 30px auto; width: 50%;
padding: 0; text-align: center;
} padding: 120px 0;
margin: 0px;
div{ background-color: #8fbbd9;
margin: 0;
padding: 0; }
}
.c3{
display: inline-block;
float: left; /* Collapse to full width column */
width: 50%;
text-align: center; @media only screen and (max-width:
padding: 120px 0; 750px){
background-color: #7ed9a7; .c4{
} width: 100%;
}
.c4{ .c5{
display: inline-block; width: 100%;
float: left; }
width: 33.33%; .c6{
text-align: center; width: 100%;
padding: 120px 0; }
background-color: rgb(230, 150, 134); }
}
@media only screen and (max-width:
.c5{ 660px){
display: inline-block; .c2{
float: left; width: 100%;
width: 33.33%; }
text-align: center; .c3{
padding: 120px 0; width: 100%;
background-color: rgb(230, 203, 118); }
} }
.c6{
display: inline-block;
float: left;
width: 33.33%;
text-align: center;
padding: 120px 0;
background-color: rgb(173, 170, 230);
}
EJERCICIO 2
CÓDIGO HTML
<div class='app-layout'>
<div class='box tweets'>Tweets</div>
<div class='box replies'>Replies</div>
<div class='box search'>Search</div>
<div class='box messages'>Messages</div>
</div>
CÓDIGO CSS
body {
margin: 0;
font-family: Arial;
background-color: #f2f2f2;
}
.box {
color: #fff;
padding: 1em;
text-align: center;
background-color: #efefef;
}