HTML
> <html lang="ru"> > <head> > <title>Испытание: строим сетку</title> > <meta charset="utf-8"> > </head> > <body> > <div class="header clearfix"> > <div class="header-child">Header</div> > <div class="menu">Menu</div> > <div class="promo-1">Promo 1</div> > <div class="promo-2">Promo 2</div> > </div> > <div class="content"> > <div class="block-1">Left</div> > <div class="block-2">Main</div> > <div class="block-3">Right</div> > </div> > <div class="footer"> > Footer > </div> > </body> > </html>
CSS:
html,
body {
margin: 0;
padding: 0;
}
body {
width: 450px;
height: 335px;
font-family: “Arial”, sans-serif;
font-size: 10px;
color: white;
}
.header {
background-color: #34495e;
}
.header-child {
float: left;
height: 25px;
width: 340px;
margin: 10px 50px;
background-color: #c0392b;
padding: 5px;
}
.menu {
background-color: #3498DB;
clear: both;
height: 30px;
margin: 10px 0px;
padding: 5px 0px 0px 55px;
}
.promo-1 {
background-color: #c0392b;
float: left;
height: 50px;
width: 160px;
margin-left: 50px;
margin-bottom: 10px;
padding: 5px;
}
.promo-2 {
background-color: #c0392b;
float: right;
width: 160px;
height: 50px;
margin-right: 50px;
margin-bottom: 10px;
padding: 5px;
}
.clearfix::after {
content: “”;
display: table;
clear: both;
}
.block-1 {
background-color: #3498DB;
float: left;
width: 60px;
height: 100px;
margin: 10px 10px 10px 50px;
padding: 5px;
}
.block-2 {
background-color: #3498DB;
float: left;
width: 180px;
height: 100px;
margin: 10px 0px 10px 0px;
padding: 5px;}
.block-3 {
background-color: #3498DB;
float: left;
width: 60px;
height: 100px;
margin: 10px 0px 10px 10px ;
padding: 5px;
}
.footer {
background-color: #34495e;
height: 30px;
padding: 5px 55px;
clear: both;
}
/*
Используемые цвета: #34495e – мокрый асфальт #c0392b – красный #3498DB – синий
*/