Using display:table-cell without containing display:table

Yes, it is valid. Read 17.2.1 of CSS2 spec regarding anonymous table objects. More specifically, these sections…

Generating missing child wrappers:

  1. If a child C of a ‘table’ or
    ‘inline-table’ box is not a proper
    table child, then generate an
    anonymous ‘table-row’ box around C and
    all consecutive siblings of C that are
    not proper table children.
  2. If a child
    C of a row group box is not a
    ‘table-row’ box, then generate an
    anonymous ‘table-row’ box around C and
    all consecutive siblings of C that are
    not ‘table-row’ boxes.
  3. If a child C of
    a ‘table-row’ box is not a
    ‘table-cell’, then generate an
    anonymous ‘table-cell’ box around C
    and all consecutive siblings of C that
    are not ‘table-cell’ boxes.

Generate missing parents:

  1. For each ‘table-cell’ box C in a
    sequence of consecutive internal table
    and ‘table-caption’ siblings, if C’s
    parent is not a ‘table-row’ then
    generate an anonymous ‘table-row’ box
    around C and all consecutive siblings
    of C that are ‘table-cell’ boxes.

  2. For
    each proper table child C in a
    sequence of consecutive proper table
    children, if C is misparented then
    generate an anonymous ‘table’ or
    ‘inline-table’ box T around C and all
    consecutive siblings of C that are
    proper table children. (If C’s parent
    is an ‘inline’ box, then T must be an
    ‘inline-table’ box; otherwise it must
    be a ‘table’ box.)

    • A ‘table-row’ is
      misparented if its parent is neither a
      row group box nor a ‘table’ or
      ‘inline-table’ box.
    • A ‘table-column’
      box is misparented if its parent is
      neither a ‘table-column-group’ box nor
      a ‘table’ or ‘inline-table’ box.
    • A row
      group box, ‘table-column-group’ box,
      or ‘table-caption’ box is misparented
      if its parent is neither a ‘table’ box
      nor an ‘inline-table’ box.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)