views:

217

answers:

2

I have an ordered list of movies. Each movie has a name and a description. The description length varies. I list the movies one by one in two columns, roughly like this:

1. Blues Brothers                      |  4. Lord of the Rings
   Cheesy movie about two guys.        |     A hobbit and his buddies go
                                       |     to destroy some ring.
2. Jurassic Park.                      |
   Some guy makes dinosaurs and some   |  5. Can't Think Of Any More
   chick uses 3D UNIX!                 |     Lorem ipsum dolor sit amet.
                                       |     Dolor sit amet lorem ipsum!!!
3. Wayne's World                       |
   Party movie deluxe!                 |  6. This Is The Last
                                       |     Now we're not balanced!
                                       |     Pretty messed up.

The above should give you an idea of how it looks today. I'm currently accomplishing this by taking the list of movies and splitting it in half and then rendering each half in turn and floating the halves next to each other.

There is a problem however! Imagine the case where the movies in the right column all have longer descriptions than those in the left column. Then the height balance would be way off!

So is there any non-JavaScript way to make this kind of thing balanced? If so, which browsers support it?

+2  A: 

Do as you are but use a repeating background image with a line down the centre for the container of the column divs. I believe this technique is called "faux columns".

da5id
Yep, it's called faux columns - there's a great alistapart write-up at http://www.alistapart.com/articles/fauxcolumns/
Dominic Rodger
No, I'm not looking for faux columns. It's not the line between the columns that is the problem, it's the height of the columns. I want them to be as height-balanced as possible.
Deniz Dogan
And to answer the last bit of the question - it's supported by every browser you are likely to care about, it's standard and simple CSS.
Dominic Rodger
I think maybe what he's asking is that if the amount of text increases, is there a way to balance the content of the columns.
tahdhaze09
@tahdhaze09: Indeed I am!
Deniz Dogan
I'm pretty sure there no non-Javascript way to do it then. I hate to even say it, but <table>s always did a reasonable job at that kind of auto-content-fitting.
da5id
+1  A: 

Unfortunately, the only non-programmatic way to overflow content is in draft status for CSS3. There is no reliable way to spill content into a new column in CSS2.1.

See the link below for the draft selectors to overflow content:

http://www.w3.org/TR/css3-multicol/

tahdhaze09