I want to create an external div wide enough to contain all of its children (which float on the left).
This is a basic diagram of what I want to achieve (in pure CSS). I tried a lot, but it doesn't seem to strangle this concept. Elements always begin to wrap in the browser view.
+--viewport-------------------+
| |
| +----parent div--------------------------------------------------------^
| | | |
| | +-------+ +-------+ +--------+ +---------+ +--------+ +-----+ |
| | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | |
| | +-------+ +-------+ +--------+ +---------+ +--------+ +-----+ |
| +----------------------------------------------------------------------+
| |
| |
+-----------------------------+
Can anyone help me with this?
source
share