
Using table, it's easy to create that, but how using only css? Help me please.
Moderator: General Moderators

my bed, sorrylord_webby wrote:create what? image is a dead link
Code: Select all
#left {
width:20%;
float:left;
}
#center{
width:60%;
max-width:600px;
float:left;
}
#right{
width:20%;
float:left;
}
Code: Select all
<div id="left">left</div>
<div id="center">center</div>
<div id="right">right</div>
Code: Select all
/* For testing */
body, html {
height: 100%;
}
.left, .right, .center {
min-height: 100%;
height: 100%;
}
.left {
background: red;
}
.right {
background: green;
}
.center {
background: blue;
}
/* Needed style */
body {
padding: 0; margin: 0;
min-width: 900px; /* Need to set min-width to prevent content from going out of screen in IE */
}
.left {
float: left;
width: 50%;
}
.right {
float: right;
width: 49.9%; /* Fix IE rounding problem */
}
.center {
width: 900px;
margin: 0 -450px; /* Margin is half of the width */
float: left;
}Code: Select all
<div class="left"></div>
<div class="right"></div>
<div class="center">
Boooo
</div>