I need help creating a layout with 3 DIVs stacked vertically, each taking up one third of the screen without causing a scroll-bar to appear. I also want an 8px margin around all three of them. Here's an image for reference...
Ultimately, I'd like a responsive design with 3 vertical sections and a uniform margin around them (No scroll-bar should be present)
This is my current CSS code:
body {
margin: 8px;
background: red;
}
.header {
width: 100%;
height: 33.33%;
background: #fff;
}
.content {
width: 100%;
height: 33.33%;
background: #ccc;
}
.footer {
width: 100%;
height: 33.33%;
background: #777;
}
<div class="container">
<div class="header">
header
</div>
<div class="content">
content
</div>
<div class="footer">
footer
</div>
</div>
The code works on liveweave.com, but not in Google Chrome browser.