HTML
<!DOCTYPE html>
<html lang="ru">
<head>
<title>Испытание: строим сетку</title>
<meta charset="utf-8">
</head>
<body>
<div class="top">
<div class="header">Header</div>
<div class="menu">Menu</div>
<div class="promo">
<div class="promo1">Promo 1</div>
<div class="promo2">Promo 2</div>
</div>
</div>
<div class="center">
<div class="left">Left</div>
<div class="main">Main</div>
<div class="right">Right</div>
</div>
<div class="footer">Footer</div>
</body>
</html>
CSS
html,
body {
margin: 0;
padding: 0;
}
body {
color: white;
font-family: "Arial", sans-serif;
font-size: 10px;
height: 335px;
width: 450px;
}
.top {
background: #34495e;
padding-top: 10px;
}
.header {
background: #c0392b;
margin: 0 auto;
min-height: 25px;
padding: 5px;
width: 340px;
}
.menu {
background: #3498DB;
min-height: 30px;
margin-top: 10px;
padding: 5px 0 0 55px;
width: 395px;
}
.promo {
display: table;
margin: 0 auto;
width: 360px;
}
.promo1,
.promo2 {
background: #c0392b;
float: left;
margin: 10px 5px;
min-height: 55px;
padding: 5px 0 0 5px;
width: 165px;
}
.center {
display: table;
margin: 10px auto;
width: 350px;
}
.left,
.main,
.right {
background: #3498DB;
float: left;
margin-right: 10px;
min-height: 100px;
padding: 5px;
}
.left,
.right {
width: 60px;
}
.main {
width: 180px;
}
.center div:last-child {
margin-right: 0;
}
.footer {
background: #34495e;
min-height: 25px;
padding: 5px 55px;
}