I want my page to have 3 blocks: LEFT CENTER RIGHT. I want block LEFT and RIGHT is about 150px wide, and block CENTER just fill up the rest of the space. There are 10px gap between the each block. Here is my attempt:
#left {
float: left;
margin-top: 2px;
padding-left: 3px;
width: 150px;
height: 800px;
color: black;
background-color: #cccccc;
}
#right {
float: right;
margin-top: 2px;
padding-left: 3px;
width: 150px;
height: 800px;
color: black;
background-color: #cccccc;
}
#center {
margin: 2px 160px 0 160px;
padding-left: 3px;
height: 800px;
background-color: yellow;
}
If I dont have the #center
, the block LEFT and RIGHT (gray color) look great. But when i try to fill the white space in the center with a Yellow block, it mess up. I cant see my RIGHT block anymore.