HTML
Испытание: строим сетку</head>
<body>
<div class="header">
<div class="layout-positioner">
<div class="head"><span>Header</span></div>
</div>
</div>
<div class="menu">
<div class="layout-positioner">
<span>Menu</span>
</div>
</div>
<div class="promo">
<div class="promo1 layout-positioner">
<div class="layout-column"><span>Promo 1</span></div>
</div>
<div class="promo2 layout-positioner">
<div class="layout-column"><span>Promo 2</span></div>
</div>
</div>
<div class="left">
<div class="layout-positioner">
<div class="feature"><span>Left</span></div>
</div>
</div>
<div class="main">
<div class="layout-positioner">
<div class="feature"><span>Main</span></div>
</div>
</div>
<div class="right">
<div class="layout-positioner">
<div class="feature"><span>Right</span></div>
</div>
</div>
<div class="footer">
<div class="layout-positioner">
<span>Footer</span>
</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;
}
span {
display: block;
padding: 5px 5px;
}
.layout-positioner {
width: 350px;
margin: 0 auto;
}
.header {
background: #34495e;
padding: 10px 0;
}
.header .head{
height: 35px;
background: #c0392b;
}
.menu {
height: 35px;
background: #3498DB;
}
.promo {
background: #34495e;
height: 60px;
padding: 10px 0;
margin-bottom: 10px;
}
.promo1 .layout-column {
width: 170px;
height: 60px;
background: #c0392b;
float: left;
}
.promo2 .layout-column {
width: 170px;
height: 60px;
background: #c0392b;
float: right;
}
.feature {
float: left;
margin-right: 10px;
width: 70px;
min-height: 110px;
background: #3498DB;
margin-bottom: 10px;
}
.main .feature {
width: 190px;
}
.right .feature {
margin-right: 0;
}
.footer {
height: 35px;
background: #34495e;
clear: both;
}