Fabien Meghazi wrote:
>A div takes all the space that it can afford.
>How can I tell a div that it should only take the space that it's
>inner elements are using ?
This is usually referred to as "shrinkwrapping". It can be accomplished
in a variety of ways, but not all browsers support all the ways.
1. change it to display: inline
2. change it to display: inline-block (does work in IE but only on
naturally inline elements like span, doesn't work in Gecko)
3. change it to display: table-cell (doesn't work in IE)
4. float it (doesn't work in MacIE unless you also give it display:
inline-block or float its contents as well)
Zoe M. Gillenwater
Highway Safety Research Center
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/