0

.table             { display: table;        }
.table > div       { display: table-column; }
.table > div > div { display: table-cell;   }
<div class="table">
  <div>
    <div>Hello</div>
    <div>Just</div>
  </div>
  <div>
    <div>World!</div>
    <div>Testing</div>
  </div>
</div>

The table is not visible here. But when I change table-column to table-row, it suddenly becomes visible:

.table             { display: table;        }
.table > div       { display: table-row;    }
.table > div > div { display: table-cell;   }
<div class="table">
  <div>
    <div>Hello</div>
    <div>Just</div>
  </div>
  <div>
    <div>World!</div>
    <div>Testing</div>
  </div>
</div>

How to make the first snippet work without using the <table> element? I am on Chrome.

isherwood
  • 58,414
  • 16
  • 114
  • 157
Book Of Flames
  • 316
  • 3
  • 13
  • 1
    Does this answer your question? [How is a CSS "display: table-column" supposed to work?](https://stackoverflow.com/questions/7617418/how-is-a-css-display-table-column-supposed-to-work) – Fabian S. Jan 31 '22 at 14:14
  • A `table-col` element behaves like the `` element, which is itself not-visible, and used to define common CSS for elements within that 'column'. Reference: https://developer.mozilla.org/en-US/docs/Web/CSS/display-internal – David Thomas Jan 31 '22 at 14:14

0 Answers0