Friday, October 24, 2008

DIV shrink-to-fit width

You need to give the DIV shrink-to-fit width, which you can get by
giving it display: inline-block, display: table, display: table-cell or
float: left. float: left is probably the most widely supported.

1 comment:

Martin K. said...

These techniques work fine if the contents do not wrap, otherwise the DIV will be as wide as it possibly can..