I have this container div whose width I would like to set according to the widths of the inner divs. The issue I am facing is that the container div with auto width spans the entire page.
I have done a rough mock of what I would like (2nd implementation with constant width set) vs what I am getting with my auto settings.
http://jsfiddle.net/n3Q3n/1/
What do I do to get the div in the center without actually having to specify a width?
change display on all divs and remove the floats from left and right.
on all:
display:inline-block;
on container:
width:100%
or this
http://jsfiddle.net/n3Q3n/15/