Dynamic horizontal layouts

Dynamic horizontal layouts

I'm trying to create a horizontal layout for a client, the problem is that the width isn't predetermined, it changes depending on how many divs there are.

You can see what I mean here: http://www.theumlaut.co.uk/wordpress/news/

I'm thinking that somehow I need to calculate the widths of all of the combined .post divs, then use that total width calculation and set it as the width for the #content div, but I really don't know how. Could someone push me in the right direction?