2 ms·
> But aren't there are HTML elements everywhere where the size is determined by their content The height is. Not the actual width. Remember, widths are compute
by pcwalton 11y ago
> But aren't there are HTML elements everywhere where the size is determined by their content
The height is. Not the actual width. Remember, widths are computed top-down, while heights are computed bottom-up.
> Less trivially, I've just put an explicitly sized DIV inside an unsized inline-block DIV, and the outer one is definitely sized according to its child.
That's because inline-block uses intrinsic width (specifically, shrink to fit width), which is computed separately from actual width in a bottom-up pass. Intrinsic width is a weird thing that is kind of a hack, and an ill-specified one to boot (although a useful one). It doesn't fundamentally change the fact that widths depend on parents' widths only.
> I think this is it: http://famous.org/ http://famous.org/
Famous is slow compared to CSS when you're using it for CSS-like designs.