Thursday, September 23, 2004

GeekStuff: CSS display inline-block

If we want a div's width and height to "shrink-to-fit" to its contents, CSS 2.1 defines a property for that:
This would be a very useful feature on many applications I'm working on. However most browsers I've tested don't support it.

So for now, a fairly decent alternative for building a visual block that shrinks to fit its contents, seems to be using a good ol' table. *gasp*. Yes. A table! :) I'll live.

Anybody else with better alternatives? Experience using inline-block? I'm all ears.

No comments: