Well, I'm aligning some div
like columns inside another that serves as a container. What I wanted to know is how do I make a certain width of the div
or page themselves clustered one on top of the other in a vertical stream?
HTML
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="utf-8">
<title>Layout Responsivo</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<div class="container" class="clearfix">
<div class="header clearfix">
<div class="logo">
logo
</div>
<div class="menu">
menu
</div>
</div>
<div class="content clearfix">
<div class="col" style="background: red;">
</div>
<div class="col" style="background: yellow;">
</div>
<div class="col" style="background: cyan;">
</div>
</div>
</div>
</body>
</html>
CSS
html, body{
padding: 0;
margin: 0;
}
.clearfix:before,
.clearfix:after {
content: " ";
display: table;
}
.clearfix:after {
clear: both;
}
.clearfix {
*zoom: 1;
}
.container{
margin: 0 auto;
margin-top: 0;
width: auto;
height: 900px;
/*...*/
background-color: #876;
}
.header{
width: 100%;
margin: 0 auto;
height: auto;
margin-bottom: 3.6em;
background-color: #2C82C9;
}
.logo{
width: 100%;
height: 160px;
/*...*/
background-color: transparent;
}
.menu{
width: 100%;
height: 70px;
/*...*/
background-color: #456;
}
/*Content*/
.content{
margin: 0 auto;
width: 88%;
height: 400px;
/*...*/
background-color: #546;
}
.col{
width: 33.33333333333333%;
float: left;
display: inline;
height: 300px;
}