Reputation: 53
I want to create an outer div that's wide enough to contain all it's children (which are floated left).
This is a basic diagram of what I want to achieve (in pure CSS). I've tried a lot, but can't seem to gasp this concept. The items always start wrapping at the browser viewport.
+--viewport-------------------+
| |
| +----parent div--------------------------------------------------------^
| | | |
| | +-------+ +-------+ +--------+ +---------+ +--------+ +-----+ |
| | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | |
| | +-------+ +-------+ +--------+ +---------+ +--------+ +-----+ |
| +----------------------------------------------------------------------+
| |
| |
+-----------------------------+
Can anybody help me with this?
Upvotes: 4
Views: 67