HTML
<head>
<title>Испытание: строим сетку</title>
<meta charset="utf-8">
</head>
<body>
<div class="bg ">
<div class="layout">
<div class="header">Header</div>
</div>
<div class="menu">
<div class="layout">Menu</div>
</div>
<div class="promo1">Promo 1</div>
<div class="promo2">Promo 2</div>
</div>
<div class="layout">
<div class="leftcl">Left</div>
<div class="maincl">Main</div>
<div class="rightcl">Right</div>
</div>
<div class="bgfooter">
<div class="layout">Footer</div>
</div>
</body>
CSS
html,
body {
margin: 0;
padding: 0;
}
body {
width: 450px;
height: 335px;
font-family: “Arial”, sans-serif;
font-size: 10px;
color: white;
}
.bg {
background-color:#34495e;
width: 100%;
min-height: 160px;
padding-top: 10px;
}
.layout {
width: 100%;
margin: 0 50px 0 50px;
}
.menu {
background-color: #3498DB;
padding: 5px;
min-height:25px;
margin-bottom: 10px;
}
.header {
background-color: #c0392b;
padding: 5px;
min-height:25px;
clear: both;
margin-bottom: 10px;
margin-right: 100px;
}
.promo1 {
background-color: #c0392b;
float: left;
min-height: 50px;
margin-left: 50px;
width: 160px;
padding: 5px;
}
.promo2 {
background-color: #c0392b;
float:left;
min-height: 50px;
margin-left:10px;
width: 160px;
padding: 5px;
}
.leftcl {
background-color: #3498DB;
min-height: 100px;
float:left;
min-width: 60px;
padding: 5px;
}
.maincl {
background-color: #3498DB;
min-height: 100px;
float:left;
margin-left: 10px;
min-width: 180px;
padding: 5px;
}
.rightcl {
background-color: #3498DB;
min-height: 100px;
float:left;
min-width: 60px;
margin-left: 10px;
padding: 5px;
}
.bgfooter {
background-color: #34495e;
clear:both;
padding: 5px;
min-height: 30px;
margin-top: 130px;
}