Is there a CSS Way to make a parent div as wide as all the divs are together inside of it. Like this:
+--------------------------------------------------+
| DIV |
| |
| +---------+ +---------+ +---------------+ |
| | | | | | | |
| | | | | | | |
| | DIV | | DIV | | DIV | |
| | | | | | | |
| | | | | | | |
| +---------+ +---------+ +---------------+ |
| |
| |
| |
| |
+--------------------------------------------------+
+---------------------------------------+
| DIV |
| +-----------+ +---------------+ |
| | | | | |
| | | | | |
| | | | | |
| | DIV | | DIV | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| +-----------+ +---------------+ |
| |
+---------------------------------------+
In the end I want to center the parent divs horizontally. Because of that, I have to get the summed up width of the child divs as the width of the parent div. I will center the parent div with display:table and margin:0 auto.
Any Ideas?
Thanks!