I have a set of "address cards" that are set up as floats, all uniformly sized, so that they'll line up nicely in rows no matter the width of the screen. What I'd like to do is have the "cards" centered on the page (or within the containing div) regardless of whether there are one, two, three, or n across. Right now they tend toward the right side of the page since, of course, they're floated right.
Is it possible to center a group of block elements while still having a fluid number of them in a single row?
If the "card" concept isn't clear, think of them as thumbnails
I'll play with that idea some when I next get the chance. But I'm wondering how exactly that would work. Wouldn't I have to use a div with no declared width? That way the div would expand and contract to exactly fit the floats. Otherwise, with a declared width, the floats would still be off to one side. And, if so, does the
margin:auto cause problems for IE?
So I'm thinking something like this (greatly reduced):