In a sample web application I have to work on, I noticed that some elements had a display: table-cell style but their parent don’t have display: table-row.
To me thats seems wrong, but I’m not sure at all.
Hence this question: Is this a valid construct ? What problems can it cause, if any ?
Thank you.
Here is an example of what I meant:
<div style="display: block">
<div style="display:table-cell">
<p>Some content</p>
</div>
</div>
I’m kind of parroting Faust who was kind enough to find the specs (but seems to have now removed his answer)…
Yes, it is (probably) valid.
From 17.2.1 Anonymous table objects,
http://www.w3.org/Style/css2-updates/css2/tables.html#anonymous-boxes
This could be read as anonymous boxes will be created in non-HTML languages that don’t have the right construct but I would assume that it will generate anonymous table objects in HTML as well.