Search code examples
csspositioncss-tables

Table positioning with CSS


enter image description here

It is a nested table. I want to know if is there a way where the table (the one with BG yellow) to be below the header. Because with this, it will depend on the data of the other table in its row.


Solution

  • Set the css attribute vertical-align to top on the cells of the parent table.

    Reference:
    https://developer.mozilla.org/en-US/docs/Web/CSS/vertical-align