My website has 5 horizontal divs that are all set to float left and have a percentage width. I want the left div to contain text and have a scrollbar. However, I am facing an issue where the scrollbar only appears when I give the div a position of absolute. When I do this, the other 4 divs get misaligned. How can I resolve this problem?
You can view the jsfiddle example here: http://jsfiddle.net/QN8RS/ Simply add position:absolute; to the CSS of the following div. This will make the scrollbar appear but also cause alignment issues with the other divs.
#left{
float:left;
background-color:#C00;
width:15%;
height:100%;
overflow:auto;
top: 0px;
bottom: 0px;
}