I\'m having trouble with getting unordered lists aligned how I want them to. Here\'s an image of what I\'m looking to achieve. How can I get it to look like the version on t
I don't know of a pure CSS technique which can handle this generically.
I've given up and used a jQuery plugin to do this in the past for something similar:
jQuery Masonry
(There's also a raw JavaScript version: Vanilla Masonry)
A picture is worth a thousand words:
float:left
the ul
you want in left, and float:right
the ul you want at right.
Example: http://jsfiddle.net/Xdyhy/
Try putting the two left lists in a div and float that div left. Then float the remaining div right.
You will have to wrap them all in one containing div otherwise the rightmost div will fly off to the edge of the page.
use clear:both in ul
ul {
float:left;
margin: 0 20px 20px 0;
padding: 0;
width: 200px;
clear:both;
}
see here