HTML
<!DOCTYPE html>
<html lang="ru">
<head>
<title>Испытание: строим сетку</title>
<meta charset="utf-8">
</head>
<body>
<header>
<div class="body_center">
<div class="header__head">
Header
</div>
</div>
<div class="main_background">
<div class="body_center">
<div class="header__main">
Menu
</div>
</div>
</div>
<div class="body_center promo">
<div class="promo__box-1">
Promo 1
</div>
<div class="promo__box-2">
Promo 2
</div>
</div>
</header>
<main>
<div class="body_center">
<div class="main-box__box-1">
Left
</div>
<div class="main-box__box-2">
Main
</div>
<div class="main-box__box-3">
Right
</div>
</div>
</main>
<footer>
<div class="body_center">
<div class="footer__box">
Footer
</div>
</div>
</footer>
</body>
</html>
CSS
html,
body {
margin: 0;
padding: 0;
}
body {
width: 450px;
height: 335px;
font-family: "Arial", sans-serif;
font-size: 10px;
color: white;
}
.body_center
{
margin: 0 auto 10px auto;
width: 350px;
}
.body_center::after
{
content: "";
display: table;
clear: both;
}
.main_background
{
background-color: #3498DB;
}
header
{
background-color: #34495e;
padding-top: 10px;
}
.header__head
{
min-height: 25px;
background-color: #c0392b;
padding: 5px;
}
.header__main
{
padding: 5px;
min-height: 25px;
}
.promo
{
min-height: 70px;
}
.promo__box-1,
.promo__box-2
{
float: left;
width: 160px;
min-height: 50px;
background-color: #c0392b;
padding: 5px;
}
.promo__box-2
{
margin-left: 10px;
}
.main-box__box-1,
.main-box__box-2,
.main-box__box-3
{
min-height: 100px;
width: 60px;
background-color: #3498DB;
float: left;
margin-right: 10px;
padding: 5px
}
.main-box__box-2
{
width: 180px;
}
.main-box__box-3
{
margin-right: 0;
}
footer
{
background-color: #34495e;
}
.footer__box
{
padding: 5px;
min-height: 25px;
}