HTML-код
<!DOCTYPE html>
<html lang="ru">
<head>
<title>Испытание: строим сетку</title>
<meta charset="utf-8">
</head>
<body>
<div class="under-header">
<div class="layout-positioner layout-header">
Header
</div>
</div>
<div class="menu">
<div class="layout-positioner layout-menu">
Menu
</div>
</div>
<div class="under-promo">
<div class="layout-positioner">
<div class="layout-promo1 layout-promo">Promo 1</div>
<div class="layout-promo2 layout-promo">Promo 2</div>
</div>
</div>
<div class="under">
<div class="layout-positioner">
<div class="layout-column-left layout-columns">Left</div>
<div class="layout-column-main layout-columns">Main</div>
<div class="layout-column-right layout-columns">Right</div>
</div>
</div>
<div class="footer">
<div class="layout-positioner layout-footer">
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;
}
.layout-positioner {
width: 350px;
margin: 0 auto;
}
.layout-positioner::after {
display: table;
content: "";
clear: both;
}
.under-header {
margin: 0;
height: 50px;
background-color: #34495e;
padding-top: 5px;
}
.menu {
height: 35px;
background-color: #3498DB;
}
.layout-menu {
padding: 5px;
width: 340px;
}
.under-promo {
height: 80px;
background-color: #34495e;
margin-bottom: 10px;
}
.under {
margin-bottom: 10px;
}
.footer {
height: 35px;
background-color: #34495e;
}
.layout-footer {
padding: 5px;
width: 340px;
}
.layout-header {
background-color: #c0392b;
height: 25px;
margin-top: 5px;
padding: 5px;
width: 340px;
}
.layout-promo {
margin-top: 10px;
min-height: 50px;
background-color: #c0392b;
}
.layout-promo1 {
float: left;
width: 160px;
padding: 5px;
}
.layout-promo2 {
float: right;
width: 160px;
padding: 5px;
}
.layout-columns {
float: left;
margin-right: 10px;
min-height: 100px;
width: 110px;
background-color: #3498DB;
padding: 5px;
}
.layout-column-right {
margin-right: 0;
width: 60px;
}
.layout-column-main {
width: 180px;
}
.layout-column-left {
width: 60px;
}