Shrink-wrap and center a container for inline-block elements
问题 I have a bunch of inline-block elements over several lines which I'd like to center horizontally. The inline-block elements all have the same fixed size, but I'd like the centering to be able to handle page resizing and adding or removing elements. I've stripped down the html/css and removed the attempt at centering for clarity. It's at http://jsfiddle.net/fe25H/1/ If you resize the results window so that the third inline-block element drops down, the container fills the width and we get this