-
-
-
<head> -
<title>Испытание: строим сетку</title> -
<meta charset="utf-8"> -
</head> -
<body> -
<div class="container"> -
<div class="container1"> -
<div class="header block">Header</div> -
<div class="menu block">Menu</div> -
<div class="promo1 block">Promo 1</div> -
<div class="promo2 block">Promo 2</div> -
<div class="clearfix"></div> -
</div> -
<div class="left block">Left</div> -
<div class="main block">Main</div> -
<div class="right block">Right</div> -
<div class="footer block">Footer</div> -
</div> -
</body> -
html,
body {
margin: 0;
padding: 0;
}
body {
width: 450px;
height: 335px;
font-family: “Arial”, sans-serif;
font-size: 10px;
color: white;
}
.container {
width: 450px;
}
.container1 {
background: #34495e;
}
.block {
margin-bottom: 10px;
padding: 10px;
color: white;
background: #34495e;
}
.header {
background: #c0392b;
width: 350px;
margin-left: auto;
margin-right: auto;
margin-top: 10px;
}
.menu {
background: #3498DB;
}
.promo1 {
float: left;
background: #c0392b;
width: 150px;
min-height: 35px;
margin-right: 10px;
margin-left: 50px;
}
.promo2 {
float: left;
background:#c0392b;
width: 150px;
min-height: 35px;
}
.left {
background: #3498DB;
float: left;
width: 50px;
margin-left: 50px;
min-height: 90px;
margin-top: 10px;
}
.main {
float: left;
background: #3498DB;
margin-left: 10px;
width: 170px;
min-height: 90px;
margin-top: 10px;
}
.right {
background: #3498DB;
float: right;
margin-right: 50px;
width: 50px;
min-height: 90px;
margin-top:10px;
}
.footer {
clear: both;
}
.clearfix {
clear: both;
height: 0px;
}
как сделать нормальное расположение текста и почему header не отступает внутри блока?