Le 7 févr. 2013 à 20:01, Barney Carroll <barney.carr...@gmail.com> a écrit :
> However, the elements wrapping pairs of labels and inputs, which I've set > to `display: table-row`, are not occupying the full width of their parent > `display: table` fieldset. What am I doing wrong? Not much; except one thing: you're applying 'display: table' to a fieldset. That is a weird element. Nominally it is a block element but with special behaviour (e.g. it auto-expands beyond the parent width if the content of said fieldset are wider). It is probably closer to a replaced element, though. And fieldset appears to generate an inner element (shadow DOM ?). In your case, the display: table is actually applied to that inner element. Replace fieldset with a div and you'll see that the width of your table-rows is actually the expected width (sum of the intrinsic width of the label and the input fields); or look at the more colourful demo linked below. Note, that is pretty much undocumented – the HTML5.1 spec doesn't appear to describe all this, I mostly cobbled that together based on explanations from Bz, one of the lead Gecko engineers. And note that e.g. Opera has a different behaviour than Gecko + WebKit - I haven't checked what IE does. > Demo here: > http://jsfiddle.net/barney/e3jCN/ More colourful demo: http://dev.l-c-n.com/_temp/bc_table-form.html Philippe -- Philippe Wittenbergh http://l-c-n.com ______________________________________________________________________ css-discuss [css-d@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/