I'm trying to make a simple page with a sidebar, and having a small issue. The thing starts out like this:
I have a container (wrapper), and inside it I have two other containers (left box, and right box - sidebar). The main container has no background color, the left container is white, and right is blue. The white (left) container has lots of text and images, so it's tall. The blue (right) container does not have a lot of info, so it just floats in the air. Is there a way to make the right container's height variable depending on the overall height of the main container + the white container? I tried height: 100%; but that didn't change anything.
Here's the code:
html is basic div id's where left + right columns are inside container.
I have a container (wrapper), and inside it I have two other containers (left box, and right box - sidebar). The main container has no background color, the left container is white, and right is blue. The white (left) container has lots of text and images, so it's tall. The blue (right) container does not have a lot of info, so it just floats in the air. Is there a way to make the right container's height variable depending on the overall height of the main container + the white container? I tried height: 100%; but that didn't change anything.
Here's the code:
Code:
#container {
overflow: hidden;
width: 100%;
}
#leftcolumn {
float: left;
color: #fff;
padding: 10px;
width: 600px;
display: inline;
position: relative;
}
#rightcolumn {
background: #0000ff;
display: inline;
padding: 10px;
width: 300px;
float: right;
position: relative;
}
html is basic div id's where left + right columns are inside container.