I have an external div with a height of 400 pixels,
In this div, I have several UL with dynamic height (variable number of LI per UL).
I want divs to be vertically aligned first, and if it doesn't fit, UL should be placed next to the div (on the right).
So, let's say first the UL has a height of 100 pixels, the second UL has a height of 250 pixels, the third is 300 pixels.
The first and second should be located one above the other (100 + 250 and 400). A third should be added directly to the first.
How can I achieve this with CSS / HTML (wihout JS). I now have this:
.outer {
height: 400px;
width:100%;
float:left;
background-color: yellow;
}
.element {
background-color:red;
float:left;
overflow:show;
}
Current fiddle:
http://jsfiddle.net/L9c9a58n/
source
share