<!DOCTYPE html>
<html lang="ru">
<head>
<title>Испытание: строим сетку</title>
<meta charset="utf-8">
</head>
<body>
<div class="top clearfix">
<div class="header">
<div class="text"> Header </div>
</div>
<div class="menu">
<div class="menu-content"> Menu </div>
</div>
<div class="layout-positioner">
<div class="promo1">
<div class="text"> Promo 1 </div>
</div>
<div class="promo2">
<div class="text">Promo 2 </div>
</div>
</div>
</div>
<div class="middle clearfix">
<div class="layout-positioner">
<div class="column-1">
<div class="text"> Left </div>
</div>
<div class="column-2">
<div class="text"> Main </div>
</div>
<div class="column-3">
<div class="text"> Right </div>
</div>
</div>
</div>
<div class="footer clearfix">
<div class="footer-content"> Footer </div>
</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;
}
/*
Используемые цвета:
#34495e – мокрый асфальт
#c0392b – красный
#3498DB – синий
*/
.top {
background-color: #34495e;
padding-top: 10px;
padding-bottom: 10px;
}
.header {
background-color: #c0392b;
height: 35px;
width: 350px;
margin-right: auto;
margin-left: auto;
margin-bottom: 10px;
}
.menu {
background-color: #3498DB;
height: 35px;
}
.menu-content {
width: 350px;
margin-right: auto;
margin-left: auto;
margin-bottom: 10px;
padding-top: 5px;
padding-left: 10px;
}
.promo1, .promo2 {
background-color: #c0392b;
height: 60px;
width: 170px;
float: left;
margin-top: 10px;
}
.promo1 {
margin-right: 10px;
}
.clearfix::after {
content: "";
display: table;
clear: both;
}
.layout-positioner {
width: 350px;
margin-right: auto;
margin-left: auto;
}
.text {
padding: 5px;
}
.middle {
padding-top: 10px;
padding-bottom: 10px;
}
.column-1 {
float: left;
background-color: #3498DB;
height: 110px;
width: 70px;
}
.column-2 {
float: left;
background-color: #3498DB;
height: 110px;
width: 190px;
}
.column-3 {
float: left;
background-color: #3498DB;
height: 110px;
width: 70px;
}
.column-1, .column-2 {
margin-right: 10px;
}
.footer {
background-color: #34495e;
}
.footer-content {
width: 350px;
height: 20px;
margin-right: auto;
margin-left: auto;
margin-bottom: 10px;
padding-top: 5px;
padding-left: 10px;
}