On Jun 22, 2007, at 9:22 PM, Trevor Nicholls wrote:
> My experience is that a browser will lay out a table - assuming
> there are no
> width attributes - at a size that will fit all of the contents.
> Columns are
> sized to fit the biggest "fixed" entry. Browsers generally do a pretty
> reasonable job of it, but my problem is what happens when the
> caption is
> much wider than the table rows.
[...]
>
> Is there a CSS solution (for IE, at least) which will prevent me
> seeing:
>
> A very
> long
> caption,
> longer
> than the
> table
> content
Most browser will wrap the caption to the width of the table.
Gecko 1.9a5pre (alpha versions of Firefox 3) currently will no wrap
the caption. I think this is a bug.
You could use:
caption{white-space:nowrap}
to prevent the caption from wrapping.
WebKit and Safari will then expand the table (sum -width- of cells)
to match the width of the caption.
Opera 9 and Gecko based browsers will not change width the table.
WebKit/Safari are clearly wrong in that, although there could be an
argument for this. The behaviour of the anonymous table-box (that
wraps around table+caption) is not clearly defined.
I'm not sure what IE does - I've put the Virtual Machine to sleep
already - please tell us.
Philippe
---
Philippe Wittenbergh
<http://emps.l-c-n.com>
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/